mirror of
https://github.com/tonytins/citylimits
synced 2025-12-19 06:14:42 -05:00
Decoupling more hardcoded data
- Created a json helper to streamline decoupling of hardcoded data - Removed non-existent VR bridge reference - News ticker files are no longer hardcoded to the game. - Removed hardcoded city and mayor names using Json helper
This commit is contained in:
parent
f8a0f97767
commit
65cc08fab6
13 changed files with 309 additions and 417 deletions
|
|
@ -1,20 +1,13 @@
|
|||
extends Node2D
|
||||
|
||||
onready var rotate_news = $RotateNews
|
||||
onready var day_cycle = $DayCycle
|
||||
onready var turtle_btn = $Controls/Status/StatCtr/ButtonCtr/TurtleBtn
|
||||
onready var cheeta_btn = $Controls/Status/StatCtr/ButtonCtr/CheetaBtn
|
||||
#onready var turtle_btn = $Controls/Status/StatCtr/ButtonCtr/TurtleBtn
|
||||
#onready var cheeta_btn = $Controls/Status/StatCtr/ButtonCtr/CheetaBtn
|
||||
|
||||
func _ready():
|
||||
SimEvents.connect("rotate_news", self, "_rotate_news")
|
||||
SimEvents.connect("send_alert", self, "_stop_news")
|
||||
|
||||
func _stop_news():
|
||||
rotate_news.stop()
|
||||
|
||||
func _resume_rotation():
|
||||
rotate_news.start()
|
||||
|
||||
func _on_DayCycle_timeout():
|
||||
|
||||
# Increment the number days until it reaches 30
|
||||
|
|
@ -35,16 +28,12 @@ func _on_DayCycle_timeout():
|
|||
if SimTime.prev_month == 12:
|
||||
SimTime.new_year()
|
||||
|
||||
func _on_TurtleBtn_toggled(button_pressed):
|
||||
if button_pressed:
|
||||
day_cycle.wait_time = 12
|
||||
cheeta_btn.pressed = false
|
||||
|
||||
func _on_CheetaBtn_toggled(button_pressed):
|
||||
if button_pressed:
|
||||
day_cycle.wait_time = 2
|
||||
turtle_btn.pressed = false
|
||||
|
||||
func _on_VRMode_pressed():
|
||||
# get_tree().change_scene("res://scenes/VR Game.tscn")
|
||||
pass
|
||||
#func _on_TurtleBtn_toggled(button_pressed):
|
||||
# if button_pressed:
|
||||
# day_cycle.wait_time = 12
|
||||
# cheeta_btn.pressed = false
|
||||
#
|
||||
#func _on_CheetaBtn_toggled(button_pressed):
|
||||
# if button_pressed:
|
||||
# day_cycle.wait_time = 2
|
||||
# turtle_btn.pressed = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue