diff --git a/Scenes/Player/player.gd b/Scenes/Player/player.gd index 19ac0ee..ba4c44d 100644 --- a/Scenes/Player/player.gd +++ b/Scenes/Player/player.gd @@ -1,5 +1,10 @@ extends Node2D +const BASE_BLOOD_GEN = 10 +const STARTING_BLOOD_AMOUNT = 100 + +var currentBloodAmount : int = 0 +var currentBloodGen : float = 0 var currentSpawnableScene : PackedScene = null var currentRefInstance : TemplateSpawnable = null var currentStateIcon : Texture2D = null @@ -13,6 +18,9 @@ var currentSpawnedMonsters : Array = [] var isInPlayableArea : bool = false func _ready(): + currentBloodAmount = STARTING_BLOOD_AMOUNT + currentBloodGen = BASE_BLOOD_GEN + playableArea.mouse_entered.connect(entered_playable_area) playableArea.mouse_exited.connect(exited_playable_area) @@ -21,6 +29,7 @@ func _process(delta): handle_spawn() handle_cursor_state() + func add_monster(monster : TemplateSpawnable): currentSpawnedMonsters.append(monster) if !allSpawnedMonsters.has(monster.monsterName): diff --git a/Scenes/Spawnables/bat_spawnable.tscn b/Scenes/Spawnables/bat_spawnable.tscn index dd4e1a5..3678f16 100644 --- a/Scenes/Spawnables/bat_spawnable.tscn +++ b/Scenes/Spawnables/bat_spawnable.tscn @@ -15,7 +15,7 @@ speed = 4000.0 damage = 1 priority = 1 expReward = 50 -cost = 100 +cost = 50 minSpawnRange = 10.0 monsterName = "Bat" monsterIcon = SubResource("AtlasTexture_bnd0j") diff --git a/Scenes/Spawnables/template_spawnable.gd b/Scenes/Spawnables/template_spawnable.gd index cc397a4..75f86d6 100644 --- a/Scenes/Spawnables/template_spawnable.gd +++ b/Scenes/Spawnables/template_spawnable.gd @@ -9,6 +9,7 @@ const ATTACK_COOLDOWN : float = 100 @export var damage : int = 0 @export var priority : int = 0 @export var expReward : int = 0 +@export var bloodGen : int = 0 @export var cost : int = 0 @export var minSpawnRange : float = 0 @export var canAttack : bool = true