mirror of
https://github.com/tonytins/citylimits
synced 2025-06-25 09:24:44 -04:00
Directory reorganization
- Zones can now detect each other
This commit is contained in:
parent
1f038ea53c
commit
abf160838c
621 changed files with 4148 additions and 5902 deletions
|
@ -1,6 +1,7 @@
|
|||
extends KinematicBody2D
|
||||
extends Area2D
|
||||
|
||||
signal grabbed
|
||||
signal has_power
|
||||
|
||||
export var cost: int = 10000
|
||||
export var income: int = 100
|
||||
|
@ -31,13 +32,6 @@ func _input(event):
|
|||
func _process(delta):
|
||||
if can_grab:
|
||||
position = get_global_mouse_position() + grabbed_offset
|
||||
|
||||
if SimData.has_power and can_grab == false:
|
||||
quarters.start()
|
||||
_animante_sprite()
|
||||
else:
|
||||
quarters.stop()
|
||||
_animante_sprite(false)
|
||||
|
||||
func _animante_sprite(animante: bool = true):
|
||||
if zone.hframes > 1 or zone.vframes > 1 and animante:
|
||||
|
@ -57,3 +51,12 @@ func _get_budget():
|
|||
var total_income = SimData.res_tax * income
|
||||
SimData.budget += total_income
|
||||
SimData.res_income = total_income
|
||||
|
||||
func _on_Zone_body_entered(body):
|
||||
if SimData.has_power and can_grab == false:
|
||||
quarters.start()
|
||||
_animante_sprite()
|
||||
|
||||
func _on_Zone_body_exited(body):
|
||||
quarters.stop()
|
||||
_animante_sprite(false)
|
||||
|
|
|
@ -33,7 +33,7 @@ func _init_advisor(file, advisor):
|
|||
JsonFile.ANALYSIS:
|
||||
dialogue_file = "res://json/policies/cityplanner_analysis.json"
|
||||
|
||||
avatar_texture.texture = preload("res://sprites/avatars/cindy.png")
|
||||
avatar_texture.texture = preload("res://assets/avatars/cindy.png")
|
||||
name_label.text = "Cindy Diamond"
|
||||
rank_label.text = "City Planner"
|
||||
|
||||
|
@ -44,7 +44,7 @@ func _init_advisor(file, advisor):
|
|||
JsonFile.ANALYSIS:
|
||||
dialogue_file = "res://json/policies/finacial_analysis.json"
|
||||
|
||||
avatar_texture.texture = preload("res://sprites/avatars/kit.png")
|
||||
avatar_texture.texture = preload("res://assets/avatars/kit.png")
|
||||
name_label.text = "Kit Welsh"
|
||||
rank_label.text = "Financial Advisor"
|
||||
|
||||
|
@ -55,7 +55,7 @@ func _init_advisor(file, advisor):
|
|||
JsonFile.ANALYSIS:
|
||||
dialogue_file = "res://json/policies/transport_analysis.json"
|
||||
|
||||
avatar_texture.texture = preload("res://sprites/avatars/zc.png")
|
||||
avatar_texture.texture = preload("res://assets/avatars/zc.png")
|
||||
name_label.text = "Zack Casey"
|
||||
rank_label.text = "Transportation Advisor"
|
||||
|
||||
|
|
|
@ -44,6 +44,6 @@ 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")
|
||||
|
|
5
scripts/window3d.gd
Normal file
5
scripts/window3d.gd
Normal file
|
@ -0,0 +1,5 @@
|
|||
extends Spatial
|
||||
|
||||
onready var node_viewport = $Viewport
|
||||
onready var node_quad = $Quad
|
||||
onready var node_area = $Quad/Area
|
Loading…
Add table
Add a link
Reference in a new issue