diff --git a/ai/Enemy.gd b/ai/Enemy.gd index e14d87d..e93d003 100644 --- a/ai/Enemy.gd +++ b/ai/Enemy.gd @@ -8,6 +8,8 @@ var health = 5 const UP = Vector2(0, -1) var velocity = Vector2() +func get_type(): + return "player" func apply_gravity(delta, modifier = 1): velocity.y += gravity * delta * modifier diff --git a/ui/PlayerStats.gd b/ui/PlayerStats.gd index aa74e31..3e8e21f 100644 --- a/ui/PlayerStats.gd +++ b/ui/PlayerStats.gd @@ -15,10 +15,9 @@ func _on_Regen_timeout(): is_burnout = false func _process(delta): - BurnoutSprite.visible = is_burnout - print(Regen.is_stopped()) if get_accurate_energy() < Energybar.max_value and Regen.is_stopped(): Regen.start() + BurnoutSprite.visible = is_burnout func set_health(value): Hearts.value = clamp(value, Hearts.min_value, Hearts.max_value) diff --git a/ui/PlayerStats.tscn b/ui/PlayerStats.tscn index 68cdcec..fa4e77d 100644 --- a/ui/PlayerStats.tscn +++ b/ui/PlayerStats.tscn @@ -6,6 +6,8 @@ [ext_resource path="res://ui/Energy.png" type="Texture" id=4] [ext_resource path="res://ui/Energy Burnout.png" type="Texture" id=5] + + [node name="Stats" type="CanvasLayer"] script = ExtResource( 1 ) @@ -47,6 +49,7 @@ __meta__ = { } [node name="Energy Burnout" type="Sprite" parent="Player UI Frame 2"] +visible = false position = Vector2( 23, -1 ) texture = ExtResource( 5 ) offset = Vector2( 0, 0.5 )