mirror of
https://github.com/creyD/ludum_dare_46.git
synced 2026-06-14 22:32:24 +02:00
First changes
This commit is contained in:
12
src/Boss/SlimeBoss/States/Motion/Idle.gd
Normal file
12
src/Boss/SlimeBoss/States/Motion/Idle.gd
Normal file
@@ -0,0 +1,12 @@
|
||||
extends "res://Boss/SlimeBoss/States/Motion/MotionState.gd"
|
||||
|
||||
func enter():
|
||||
owner.get_node("AnimationPlayer").play("MoveDown") # TODO: Replace animation
|
||||
|
||||
func handle_input(event):
|
||||
return .handle_input(event)
|
||||
|
||||
func update(delta):
|
||||
var input_direction = get_input_direction()
|
||||
if input_direction:
|
||||
emit_signal("finished", "move")
|
||||
7
src/Boss/SlimeBoss/States/Motion/MotionState.gd
Normal file
7
src/Boss/SlimeBoss/States/Motion/MotionState.gd
Normal file
@@ -0,0 +1,7 @@
|
||||
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
|
||||
16
src/Boss/SlimeBoss/States/Motion/SplitUp.gd
Normal file
16
src/Boss/SlimeBoss/States/Motion/SplitUp.gd
Normal file
@@ -0,0 +1,16 @@
|
||||
extends Node
|
||||
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# pass
|
||||
16
src/Boss/SlimeBoss/States/Motion/Stagger.gd
Normal file
16
src/Boss/SlimeBoss/States/Motion/Stagger.gd
Normal file
@@ -0,0 +1,16 @@
|
||||
extends Node
|
||||
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# pass
|
||||
16
src/Boss/SlimeBoss/States/Motion/Wander.gd
Normal file
16
src/Boss/SlimeBoss/States/Motion/Wander.gd
Normal file
@@ -0,0 +1,16 @@
|
||||
extends Node
|
||||
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# pass
|
||||
Reference in New Issue
Block a user