added battle state as globals, adds half working battle flow
This commit is contained in:
parent
b09eee0805
commit
4963131d3e
12 changed files with 250 additions and 95 deletions
|
|
@ -45,3 +45,13 @@ func _physics_process(delta: float) -> void:
|
|||
velocity = Vector3.ZERO
|
||||
in_battle = true
|
||||
collider.start_battle(self)
|
||||
|
||||
func faint() -> void:
|
||||
self.queue_free()
|
||||
|
||||
func attack_enemy(enemy: Monster) -> int:
|
||||
var damage = data.attack_enemy(enemy.data)
|
||||
return damage
|
||||
|
||||
func take_damage(amount: int) -> void:
|
||||
data.take_damage(amount)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue