brought back drops on all enemy deaths
This commit is contained in:
@@ -11,7 +11,7 @@ config_version=5
|
||||
[application]
|
||||
|
||||
config/name="First Person Test"
|
||||
run/main_scene="res://assets/blockout_2.tscn"
|
||||
run/main_scene="res://scenes/test_level_2v2.tscn"
|
||||
config/features=PackedStringArray("4.3", "Forward Plus")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ extends Node
|
||||
@export_enum("Silver", "Gold", "Special") var key_type: int
|
||||
@export var special_key_name : String
|
||||
@export_group("Item Drops")
|
||||
@export var number_of_drops = 5
|
||||
@export var ammo_drop_enabled = true
|
||||
@export var stamina_drop_enabled = true
|
||||
@export var health_drop_enabled = true
|
||||
@@ -54,7 +55,7 @@ func _process(delta):
|
||||
# loot on last enemy
|
||||
if enemies.size() == 1:
|
||||
for i in enemies:
|
||||
i.loot_amount = 20 #assign loot to the last enemy drop from this section
|
||||
i.loot_amount = number_of_drops #assign loot to the last enemy drop from this section
|
||||
i.last_enemy = true
|
||||
else:
|
||||
enemy_in_room_killed()
|
||||
|
||||
@@ -3,11 +3,11 @@ extends CharacterBody3D
|
||||
signal last_enemy_dead()
|
||||
|
||||
var player
|
||||
var loot_amount = 0
|
||||
var last_enemy : bool = false
|
||||
|
||||
@export var health = 3
|
||||
@export var SPEED = 3.0
|
||||
@export var loot_amount = 2
|
||||
const MAX_LV = 10
|
||||
const MAX_AV = 10
|
||||
|
||||
|
||||
Reference in New Issue
Block a user