30 lines
790 B
GDScript
30 lines
790 B
GDScript
extends Reference
|
|
|
|
const INTERFACES = [preload("res://scripts/player/state/state_interface.tres")]
|
|
const NAME = "playing_rover_game"
|
|
|
|
var ctx: KinematicBody = null
|
|
|
|
func enter_from(state):
|
|
var anim_tree: AnimationTree = ctx.get_node("model_transform/DungMan/AnimationTree")
|
|
var move_playback: AnimationNodeStateMachinePlayback = anim_tree["parameters/Move/playback"]
|
|
move_playback.travel("idle")
|
|
|
|
func exit_to(state):
|
|
pass
|
|
|
|
func physics_process(delta):
|
|
pass
|
|
|
|
func unhandled_input(event: InputEvent):
|
|
pass
|
|
|
|
func on_sleep(made_it_to_bed: bool, hop_position: Spatial):
|
|
ctx.change_state(ctx.StateSleeping.new(made_it_to_bed, hop_position))
|
|
|
|
func on_start_playing_rover_game():
|
|
assert(false, "invalid state")
|
|
|
|
func on_stop_playing_rover_game():
|
|
ctx.change_state(ctx.StateDefault.new())
|