-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.gd
More file actions
54 lines (30 loc) · 1.15 KB
/
Main.gd
File metadata and controls
54 lines (30 loc) · 1.15 KB
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
48
49
50
51
52
53
extends Control
# HomeDisplay,ShopDisplay,FlowerDisplay
@onready var NodePage = ["MarginContainer/VBoxContainer/HomeDisplay","MarginContainer/VBoxContainer/ShopDisplay","MarginContainer/VBoxContainer/FlowerDisplay"]
@onready var PopUpPage = ["CostumizeDisplay"]
@onready var NodePageSelected = [true,false,false]
@onready var PopUpPageSelected = [false]
# Called when the node enters the scene tree for the first time.
func _ready():
$Timer.start()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta):
pass
func _on_main_bubble_pressed():
Game.bubble += Game.click;
func currentpage(Parameter):
NodePageSelected = Parameter
for i in range(0,NodePageSelected.size(),1):
get_node(NodePage[i]).visible = NodePageSelected[i]
func _on_home_button_pressed():
currentpage([true,false,false])
func _on_shop_button_pressed():
currentpage([false,true,false])
func _on_timer_timeout():
Game.bubble += Game.BPS;
func _on_shop_button_2_pressed():
currentpage([false,false,true])
func _on_costume_button_pressed():
$CostumizeDisplay.visible = true
func _on_button_pressed():
$CostumizeDisplay.visible = false