summaryrefslogtreecommitdiff
path: root/Scenes/Global.gd
blob: 6b40d87933b5269959dbc85317b24eae7676c3d8 (plain)
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
extends Node

onready var STARTING_TURNS = 20
onready var BONUS_TURNS_STAGE_FINISH = 10

onready var turns = STARTING_TURNS setget set_turns
onready var current_stage = 0 setget set_stage
onready var active_crystals = 0 setget set_crystals
onready var max_crystals = 0
onready var onboarding = false

signal update_ui

func reset():
	turns = STARTING_TURNS
	current_stage = 0
	active_crystals = 0
	max_crystals = 0

func set_turns(t):
	turns = t
	emit_signal("update_ui")

func set_stage(s):
	current_stage = s
	emit_signal("update_ui")

func set_crystals(c):
	active_crystals = c
	emit_signal("update_ui")