Fix: Molecular player sprite set explicitely now, should not be affected by editor anymore
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user