Swinging Saws (plus prototype level select)
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
TheRailGoat committed 2026-10-25 22:51:51 -05:00
1 parent 4fd5347f85
commit 3b0b981337
11 files changed
+458

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
extends Node2D
@export var max_distance = 260.0
var alt_position = Vector2(position.x + max_distance,0)
@export var fullswing_cw = false
@export var fullswing_ccw = false
@export var halfswing_cw = false
@export var halfswing_ccw = false
func _ready() -> void:
alt_position = Vector2(position.x + max_distance,0)
func _process(delta: float) -> void:
if fullswing_cw: $AnimationPlayer.play("fullswing_cw")
elif fullswing_ccw: $AnimationPlayer.play("fullswing_ccw")
elif halfswing_cw: $AnimationPlayer.play("halfswing_cw")
else:
$AnimationPlayer.play("halfswing_ccw")
%Player2D.is_on_moving_platform = false
func on_contact(body: Node2D) -> void:
if body==%Player2D and %Player2D.death_cooldown == 0:
print("SLASH KILL")
%Player2D/Jetpack/DeathSound.play()
%Player2D.on_death(false,%Player2D.position)