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
|
var resources: int = 0
|
||||||
|
|
||||||
# Health
|
# Health
|
||||||
|
var maxHealth: int = 100
|
||||||
var healthPoints: int = 100
|
var healthPoints: int = 100
|
||||||
var isAlive: bool = true
|
var isAlive: bool = true
|
||||||
@onready var invulnerable_cooldown_timer: Timer = $InvulnerableCooldownTimer
|
@onready var invulnerable_cooldown_timer: Timer = $InvulnerableCooldownTimer
|
||||||
@@ -31,6 +32,8 @@ func _ready() -> void:
|
|||||||
attack_timer.wait_time = attack_duration
|
attack_timer.wait_time = attack_duration
|
||||||
attack_cooldown_timer.wait_time = attack_cooldown_duration
|
attack_cooldown_timer.wait_time = attack_cooldown_duration
|
||||||
|
|
||||||
|
sprite.play("default")
|
||||||
|
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
# TODO: Connects this to some respawn screen
|
# TODO: Connects this to some respawn screen
|
||||||
@@ -107,3 +110,7 @@ func handle_damage(dmg: int, src: Node) -> void:
|
|||||||
func collect_resource(damnt: int) -> void:
|
func collect_resource(damnt: int) -> void:
|
||||||
resources += damnt
|
resources += damnt
|
||||||
print("Resource collected! Total: ", resources)
|
print("Resource collected! Total: ", resources)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ script = ExtResource("1_0ix7k")
|
|||||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=1745800698]
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=1745800698]
|
||||||
visibility_layer = 2
|
visibility_layer = 2
|
||||||
sprite_frames = SubResource("SpriteFrames_onrkg")
|
sprite_frames = SubResource("SpriteFrames_onrkg")
|
||||||
|
animation = &"attacking"
|
||||||
|
|
||||||
[node name="AttackArea" type="Area2D" parent="." unique_id=187975387]
|
[node name="AttackArea" type="Area2D" parent="." unique_id=187975387]
|
||||||
position = Vector2(0, 56)
|
position = Vector2(0, 56)
|
||||||
|
|||||||
Reference in New Issue
Block a user