progress
This commit is contained in:
21
ActionState.gd
Normal file
21
ActionState.gd
Normal file
@@ -0,0 +1,21 @@
|
||||
extends Node
|
||||
|
||||
enum Action { WALK = 0, LOOK = 1, TOUCH = 2, TALK = 3 }
|
||||
|
||||
var current_action: int = Action.WALK:
|
||||
set(value):
|
||||
current_action = value
|
||||
action_changed.emit(value)
|
||||
|
||||
signal action_changed(new_action: int)
|
||||
|
||||
func get_action_name() -> String:
|
||||
match current_action:
|
||||
Action.WALK: return "walk"
|
||||
Action.LOOK: return "look"
|
||||
Action.TOUCH: return "touch"
|
||||
Action.TALK: return "talk"
|
||||
return "walk"
|
||||
|
||||
func get_action_enum() -> int:
|
||||
return current_action
|
||||
Reference in New Issue
Block a user