aboutsummaryrefslogtreecommitdiff
path: root/game/src/SampleGame.gd
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-03-22 17:56:24 +0100
committer GitHub <noreply@github.com>2023-03-22 17:56:24 +0100
commiteb87e2af53bd693e04739aaee84fde408e72f3a9 (patch)
treedf2d5211157f9222c3c7fc21888bea08411c8c9b /game/src/SampleGame.gd
parent540dddf46e80a91c77e465cbf6fdb81dd9977057 (diff)
Basic Game Session skeleton (#67)
* Fixed grab_focus error on not is_inside_tree * Moved SampleGame to GameSession/GameSession * Basic GameSession and GameSessionMenu/Escape Menu * Map Control Panel skeleton * Added requirement comments * Removed unnecessary CenterContainer
Diffstat (limited to 'game/src/SampleGame.gd')
-rw-r--r--game/src/SampleGame.gd49
1 files changed, 0 insertions, 49 deletions
diff --git a/game/src/SampleGame.gd b/game/src/SampleGame.gd
deleted file mode 100644
index 589fed2..0000000
--- a/game/src/SampleGame.gd
+++ /dev/null
@@ -1,49 +0,0 @@
-extends Control
-
-var selectedId = 0
-
-@export
-var _province_num_display : Label
-
-@export
-var _province_size_display : Label
-
-@export
-var _main_menu_scene : PackedScene
-
-# Called when the node enters the scene tree for the first time.
-func _ready():
- updateVisibleInfo()
- pass # Replace with function body.
-
-
-# Called every frame. 'delta' is the elapsed time since the previous frame.
-#func _process(delta):
-# pass
-
-
-func updateVisibleInfo():
- _province_num_display.text = str(selectedId)
- _province_size_display.text = str(Simulation.queryProvinceSize(selectedId))
-
-
-func _on_pass_time_button_pressed():
- Simulation.conductSimulationStep()
- updateVisibleInfo()
-
-
-func _on_next_prov_button_pressed():
- selectedId = (selectedId + 1) % 10
- updateVisibleInfo()
-
-
-func _on_prev_prov_button_pressed():
- if selectedId == 0:
- selectedId = 9
- else:
- selectedId -= 1
- updateVisibleInfo()
-
-
-func _on_to_main_menu_pressed():
- get_tree().change_scene_to_packed(_main_menu_scene)