mirror of
https://github.com/creyD/ludum_dare_46.git
synced 2026-06-14 06:22:22 +02:00
Start of animation player state mashine
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
extends "res://Boss/SlimeBoss/States/Motion/MotionState.gd"
|
||||
extends "res://Overlap/StateMachine/MotionState.gd"
|
||||
|
||||
func enter():
|
||||
owner.get_node("AnimationPlayer").play("MoveDown") # TODO: Replace animation
|
||||
@@ -9,4 +9,5 @@ func handle_input(event):
|
||||
func update(delta):
|
||||
var input_direction = get_input_direction()
|
||||
if input_direction:
|
||||
emit_signal("finished", "move")
|
||||
# emit_signal("finished", "move")
|
||||
pass
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
extends "res://Overlap/StateMachine/State.gd"
|
||||
|
||||
func get_input_direction():
|
||||
var input_direction = Vector2()
|
||||
input_direction.x = int(Input.is_action_pressed("move_right")) - int(Input.is_action_pressed("move_left"))
|
||||
input_direction.y = int(Input.is_action_pressed("move_down")) - int(Input.is_action_pressed("move_up"))
|
||||
return input_direction
|
||||
Reference in New Issue
Block a user