initial implementation of sword attack

This commit is contained in:
2021-12-04 02:28:48 -06:00
parent 7e39fdf2bc
commit f18924dd3d
10 changed files with 203 additions and 89 deletions

View File

@@ -4,7 +4,6 @@ const SPEED: int = 60
var player: KinematicBody2D = null
var velocity: Vector2 = Vector2.ZERO
var last_x = 0.0
func _physics_process(_delta: float) -> void:
@@ -17,9 +16,6 @@ func _physics_process(_delta: float) -> void:
$AnimatedSprite1.scale.x = -0.563
else:
$AnimatedSprite1.scale.x = 0.563
if velocity.x != 0:
last_x = velocity.x
velocity = move_and_slide(velocity)
return