-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCatch.gd
More file actions
42 lines (29 loc) · 707 Bytes
/
Catch.gd
File metadata and controls
42 lines (29 loc) · 707 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
extends AudioStreamPlayer2D
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
export (AudioStream) var catch
export (AudioStream) var catch_cheer
export (AudioStream) var fail
var isCheer = false
# 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
func _on_Game_catch_fail():
stream = fail
play()
func _on_Game_catch(success):
if success:
if isCheer:
stream = catch_cheer
else:
stream = catch
play()
func _on_beat_changeTheme(laugh):
if laugh:
isCheer = false
else:
isCheer = true