cleanup: comments
This commit is contained in:
@@ -15,7 +15,7 @@ var can_attack: bool = true
|
||||
|
||||
func _ready() -> void:
|
||||
health = maxHealth
|
||||
sprite.play("Healthy") # TODO: add play_sprite function which calls both sprite and wrapper
|
||||
sprite.play("Healthy") # TODO: sprite play logic (esp wrt state switching)
|
||||
wrapper.play_sprite("Healthy")
|
||||
if starting_pos:
|
||||
collision.set_position(starting_pos)
|
||||
|
||||
@@ -14,14 +14,12 @@ func _ready() -> void:
|
||||
var dup = owner.collision.duplicate(dupFlags)
|
||||
mirrors.append(dup)
|
||||
owner.call_deferred("add_child", dup)
|
||||
#for i in owner.get_groups():
|
||||
# if not str(i).begins_with("_"):
|
||||
# m.add_to_group(i)
|
||||
if dup.has_method("duplicate_init"):
|
||||
dup.duplicate_init()
|
||||
|
||||
_handle_wrapping()
|
||||
|
||||
# FIXME: parent sprites should have a function calling this.
|
||||
func play_sprite(anim: String) -> void:
|
||||
for m in mirrors:
|
||||
m.get_node("Sprite").play(anim)
|
||||
|
||||
Reference in New Issue
Block a user