-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTutorial_Input.gd
More file actions
28 lines (20 loc) · 651 Bytes
/
Copy pathTutorial_Input.gd
File metadata and controls
28 lines (20 loc) · 651 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
extends Sprite
export(int, "W", "Space", "Click") var input = 0
onready var anim_player = get_node("AnimationPlayer")
onready var anim_tree = get_node("AnimationTree")
onready var anim_travel = get_node("AnimationTree").get("parameters/playback")
# Called when the node enters the scene tree for the first time.
func _ready():
match input:
0:
anim_tree.active = true
anim_travel.travel("W_Press")
1:
anim_tree.active = false
anim_player.play("Space_Bar")
2:
anim_tree.active = false
anim_player.play("Click")
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass