diff --git a/evolve-die-repeat/molecular/molecular_player.gd b/evolve-die-repeat/molecular/molecular_player.gd index 6b969c8..78da0fe 100644 --- a/evolve-die-repeat/molecular/molecular_player.gd +++ b/evolve-die-repeat/molecular/molecular_player.gd @@ -18,6 +18,7 @@ var desired_rotation: float = 0 var resources: int = 0 # Health +var maxHealth: int = 100 var healthPoints: int = 100 var isAlive: bool = true @onready var invulnerable_cooldown_timer: Timer = $InvulnerableCooldownTimer @@ -30,6 +31,8 @@ func _ready() -> void: attack_area.monitoring = false # no collision until attacking TODO: Thing about being attacked attack_timer.wait_time = attack_duration attack_cooldown_timer.wait_time = attack_cooldown_duration + + sprite.play("default") func _process(delta): @@ -107,3 +110,7 @@ func handle_damage(dmg: int, src: Node) -> void: func collect_resource(damnt: int) -> void: resources += damnt print("Resource collected! Total: ", resources) + + + + diff --git a/evolve-die-repeat/molecular/molecular_player.tscn b/evolve-die-repeat/molecular/molecular_player.tscn index 7c27e37..7f0329b 100644 --- a/evolve-die-repeat/molecular/molecular_player.tscn +++ b/evolve-die-repeat/molecular/molecular_player.tscn @@ -44,6 +44,7 @@ script = ExtResource("1_0ix7k") [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=1745800698] visibility_layer = 2 sprite_frames = SubResource("SpriteFrames_onrkg") +animation = &"attacking" [node name="AttackArea" type="Area2D" parent="." unique_id=187975387] position = Vector2(0, 56)