This commit is contained in:
1 parent
3b0b981337
commit
43b38b2428
13 files changed
+500
-12
No files matched your search
+4
-1
@@ -1,6 +1,7 @@
|
||||
extends Node2D
|
||||
|
||||
@export var max_distance = 260.0
|
||||
@export var spawn_delay = 0.0
|
||||
var alt_position = Vector2(position.x + max_distance,0)
|
||||
@export var fullswing_cw = false
|
||||
@export var fullswing_ccw = false
|
||||
@@ -11,11 +12,13 @@ func _ready() -> void:
|
||||
alt_position = Vector2(position.x + max_distance,0)
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
await get_tree().create_timer(spawn_delay).timeout
|
||||
if fullswing_cw: $AnimationPlayer.play("fullswing_cw")
|
||||
elif fullswing_ccw: $AnimationPlayer.play("fullswing_ccw")
|
||||
elif halfswing_cw: $AnimationPlayer.play("halfswing_cw")
|
||||
elif halfswing_ccw: $AnimationPlayer.play("halfswing_ccw")
|
||||
else:
|
||||
$AnimationPlayer.play("halfswing_ccw")
|
||||
$AnimationPlayer.play("RESET")
|
||||
%Player2D.is_on_moving_platform = false
|
||||
|
||||
func on_contact(body: Node2D) -> void:
|
||||
|
||||
Reference in new issue
Block a user