-
Notifications
You must be signed in to change notification settings - Fork 1
/
Cutscene.gd
47 lines (41 loc) · 985 Bytes
/
Cutscene.gd
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
43
44
45
46
47
extends Node2D
var page_counter : int = 1
onready var cut1 = $Cutscene1
onready var cut2 = $Cutscene2
onready var cut3 = $Cutscene3
onready var cut4 = $Cutscene4
onready var audiobit = $AudioStreamPlayer
# Called when the node enters the scene tree for the first time.
func _ready():
page_counter = 1
func _process(_delta):
#Detects player input.
if Input.is_action_pressed("ui_accept"):
if page_counter < 5:
page_counter += 1
#Switches cutscene sprites.
match page_counter:
_:
cut1.visible = true
cut2.visible = false
cut3.visible = false
cut4.visible = false
2:
cut1.visible = false
cut2.visible = true
cut3.visible = false
cut4.visible = false
3:
cut1.visible = false
cut2.visible = false
cut3.visible = true
cut4.visible = false
4:
cut1.visible = false
cut2.visible = false
cut3.visible = false
cut4.visible = true
audiobit.play() #Should play this as well lol
# 5: changescene()
#func changescene():
#