mirror of
https://github.com/tonytins/citylimits
synced 2025-06-25 09:24:44 -04:00
Added advisor window
This commit is contained in:
parent
71bdc3d971
commit
8435cab605
18 changed files with 301 additions and 147 deletions
55
scenes/Advise.tscn
Normal file
55
scenes/Advise.tscn
Normal file
|
@ -0,0 +1,55 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://sprites/avatars/zc.png" type="Texture" id=1]
|
||||
[ext_resource path="res://scripts/Adviser.gd" type="Script" id=2]
|
||||
|
||||
[node name="AdvsiorNotice" type="AcceptDialog"]
|
||||
anchor_left = 0.293945
|
||||
anchor_top = 0.303333
|
||||
anchor_right = 0.706055
|
||||
anchor_bottom = 0.696667
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": true
|
||||
}
|
||||
advisor_name = "Zack Casey"
|
||||
rank = "City Planner"
|
||||
title = "Welcome!"
|
||||
description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus quis facilisis purus. Donec hendrerit lectus ex, eget feugiat felis egestas a. Proin ut ornare libero. Mauris non maximus sapien. Ut gravida, metus quis finibus suscipit, lacus ante lobortis libero, sed faucibus lacus nulla hendrerit magna. Nunc tempus purus vel lectus sollicitudin faucibus ut non magna. Pellentesque id varius eros, nec dapibus tellus. Sed vitae lacus dignissim, malesuada est eget, rhoncus velit."
|
||||
avatar = ExtResource( 1 )
|
||||
|
||||
[node name="Container" type="HSplitContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 8.0
|
||||
margin_top = 8.0
|
||||
margin_right = -8.0
|
||||
margin_bottom = -36.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Advisor" type="VBoxContainer" parent="Container"]
|
||||
margin_right = 100.0
|
||||
margin_bottom = 192.0
|
||||
|
||||
[node name="Avatar" type="TextureRect" parent="Container/Advisor"]
|
||||
margin_right = 100.0
|
||||
rect_min_size = Vector2( 100, 0 )
|
||||
|
||||
[node name="RankLbl" type="Label" parent="Container/Advisor"]
|
||||
margin_top = 4.0
|
||||
margin_right = 100.0
|
||||
margin_bottom = 18.0
|
||||
align = 1
|
||||
|
||||
[node name="NameLbl" type="Label" parent="Container/Advisor"]
|
||||
margin_top = 22.0
|
||||
margin_right = 100.0
|
||||
margin_bottom = 36.0
|
||||
align = 1
|
||||
|
||||
[node name="DescriptionLbl" type="RichTextLabel" parent="Container"]
|
||||
margin_left = 112.0
|
||||
margin_right = 406.0
|
||||
margin_bottom = 192.0
|
27
scenes/Map.tscn
Normal file
27
scenes/Map.tscn
Normal file
|
@ -0,0 +1,27 @@
|
|||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://sprites/water.tres" type="TileSet" id=1]
|
||||
[ext_resource path="res://scripts/Map.gd" type="Script" id=2]
|
||||
[ext_resource path="res://sprites/terrian.tres" type="TileSet" id=4]
|
||||
[ext_resource path="res://scripts/CameraMove.gd" type="Script" id=5]
|
||||
|
||||
[node name="world" type="Node2D"]
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_lock_": true
|
||||
}
|
||||
|
||||
[node name="water" type="TileMap" parent="."]
|
||||
tile_set = ExtResource( 1 )
|
||||
cell_size = Vector2( 16, 16 )
|
||||
format = 1
|
||||
|
||||
[node name="terrian" type="TileMap" parent="."]
|
||||
tile_set = ExtResource( 4 )
|
||||
cell_size = Vector2( 16, 16 )
|
||||
format = 1
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
position = Vector2( 512, 304 )
|
||||
current = true
|
||||
script = ExtResource( 5 )
|
71
scenes/Start.tscn
Normal file
71
scenes/Start.tscn
Normal file
|
@ -0,0 +1,71 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://scripts/StartGame.gd" type="Script" id=1]
|
||||
[ext_resource path="res://scenes/Map.tscn" type="PackedScene" id=2]
|
||||
|
||||
[node name="SartMenu" type="Node"]
|
||||
|
||||
[node name="World" parent="." instance=ExtResource( 2 )]
|
||||
|
||||
[node name="Controls" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="Start" type="Panel" parent="Controls"]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -142.0
|
||||
margin_top = -76.0
|
||||
margin_right = 130.0
|
||||
margin_bottom = 70.0
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Container" type="VBoxContainer" parent="Controls/Start"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_left = 24.0
|
||||
margin_top = 28.0
|
||||
margin_right = -29.0
|
||||
margin_bottom = -28.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": true
|
||||
}
|
||||
|
||||
[node name="Label" type="Label" parent="Controls/Start/Container"]
|
||||
margin_right = 219.0
|
||||
margin_bottom = 14.0
|
||||
text = "Welcome to City Limits!"
|
||||
align = 1
|
||||
|
||||
[node name="CityNameEdit" type="LineEdit" parent="Controls/Start/Container"]
|
||||
margin_top = 18.0
|
||||
margin_right = 219.0
|
||||
margin_bottom = 42.0
|
||||
text = "Furtropolis"
|
||||
align = 1
|
||||
caret_blink = true
|
||||
caret_blink_speed = 0.5
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="BudgetMenu" type="MenuButton" parent="Controls/Start/Container"]
|
||||
margin_top = 46.0
|
||||
margin_right = 219.0
|
||||
margin_bottom = 66.0
|
||||
text = "Starting Budget"
|
||||
items = [ "20000", null, 0, false, false, 0, 0, null, "", false, "10000", null, 0, false, false, 1, 0, null, "", false, "500", null, 0, false, false, 2, 0, null, "", false ]
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="CreateBtn" type="Button" parent="Controls/Start/Container"]
|
||||
margin_top = 70.0
|
||||
margin_right = 219.0
|
||||
margin_bottom = 90.0
|
||||
text = "Create"
|
||||
|
||||
[connection signal="pressed" from="Controls/Start/Container/CreateBtn" to="Controls/Start" method="_on_CreateBtn_pressed"]
|
144
scenes/game.tscn
144
scenes/game.tscn
|
@ -1,112 +1,96 @@
|
|||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://sprites/water.tres" type="TileSet" id=1]
|
||||
[ext_resource path="res://scripts/gpanel.gd" type="Script" id=2]
|
||||
[ext_resource path="res://sprites/terrian.tres" type="TileSet" id=3]
|
||||
[ext_resource path="res://scripts/world.gd" type="Script" id=4]
|
||||
[ext_resource path="res://scripts/cameramovement.gd" type="Script" id=5]
|
||||
[ext_resource path="res://scenes/Zone.tscn" type="PackedScene" id=6]
|
||||
[ext_resource path="res://scenes/Map.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://scenes/Advise.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://scripts/Status.gd" type="Script" id=3]
|
||||
[ext_resource path="res://scripts/Game.gd" type="Script" id=4]
|
||||
[ext_resource path="res://sprites/police.png" type="Texture" id=5]
|
||||
[ext_resource path="res://sprites/firestation.png" type="Texture" id=6]
|
||||
|
||||
[node name="game" type="Node"]
|
||||
|
||||
[node name="world" type="Node2D" parent="."]
|
||||
[node name="Game" type="Node"]
|
||||
script = ExtResource( 4 )
|
||||
__meta__ = {
|
||||
"_edit_lock_": true
|
||||
}
|
||||
|
||||
[node name="water" type="TileMap" parent="world"]
|
||||
tile_set = ExtResource( 1 )
|
||||
cell_size = Vector2( 16, 16 )
|
||||
format = 1
|
||||
[node name="Map" parent="." instance=ExtResource( 1 )]
|
||||
|
||||
[node name="terrian" type="TileMap" parent="world"]
|
||||
tile_set = ExtResource( 3 )
|
||||
cell_size = Vector2( 16, 16 )
|
||||
format = 1
|
||||
[node name="Controls" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="world"]
|
||||
position = Vector2( 512, 304 )
|
||||
current = true
|
||||
script = ExtResource( 5 )
|
||||
|
||||
[node name="Resdenital" parent="world" instance=ExtResource( 6 )]
|
||||
position = Vector2( 152.043, 336.414 )
|
||||
|
||||
[node name="ui" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="base" type="Control" parent="ui"]
|
||||
[node name="GUI" type="Control" parent="Controls"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
__meta__ = {
|
||||
"_edit_lock_": true,
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="gpanel" type="Panel" parent="ui/base"]
|
||||
anchor_right = 1.0
|
||||
margin_bottom = 23.0
|
||||
script = ExtResource( 2 )
|
||||
[node name="AdvsiorNotice" parent="Controls/GUI" instance=ExtResource( 2 )]
|
||||
|
||||
[node name="Status" type="Panel" parent="Controls/GUI"]
|
||||
anchor_top = 0.883459
|
||||
anchor_right = 0.592773
|
||||
anchor_bottom = 1.00179
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
"_edit_use_anchors_": true
|
||||
}
|
||||
|
||||
[node name="citymenus" type="HBoxContainer" parent="ui/base/gpanel"]
|
||||
anchor_top = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = 3.0
|
||||
margin_top = -10.0
|
||||
margin_right = 166.0
|
||||
margin_bottom = 10.0
|
||||
[node name="Toolbar" type="HBoxContainer" parent="Controls/GUI/Status"]
|
||||
anchor_left = 0.00823723
|
||||
anchor_top = 0.0704225
|
||||
anchor_right = 0.98682
|
||||
anchor_bottom = 1.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
"_edit_use_anchors_": true
|
||||
}
|
||||
|
||||
[node name="citynamelbl" type="Label" parent="ui/base/gpanel/citymenus"]
|
||||
margin_top = 3.0
|
||||
margin_right = 66.0
|
||||
margin_bottom = 17.0
|
||||
[node name="Status" type="VBoxContainer" parent="Controls/GUI/Status/Toolbar"]
|
||||
margin_right = 93.0
|
||||
margin_bottom = 66.0
|
||||
script = ExtResource( 3 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": true
|
||||
}
|
||||
|
||||
[node name="CityNameLbl" type="Label" parent="Controls/GUI/Status/Toolbar/Status"]
|
||||
margin_right = 93.0
|
||||
margin_bottom = 14.0
|
||||
text = "City Name"
|
||||
align = 1
|
||||
|
||||
[node name="gamespeed" type="MenuButton" parent="ui/base/gpanel/citymenus"]
|
||||
margin_left = 70.0
|
||||
margin_right = 163.0
|
||||
margin_bottom = 20.0
|
||||
[node name="GameSpeed" type="MenuButton" parent="Controls/GUI/Status/Toolbar/Status"]
|
||||
margin_top = 18.0
|
||||
margin_right = 93.0
|
||||
margin_bottom = 38.0
|
||||
focus_mode = 2
|
||||
text = "Game Speed"
|
||||
items = [ "Slow", null, 0, false, false, 0, 0, null, "", false, "Medium", null, 0, false, false, 1, 0, null, "", false, "Fast", null, 0, false, false, 2, 0, null, "", false ]
|
||||
|
||||
[node name="citystatus" type="HBoxContainer" parent="ui/base/gpanel"]
|
||||
anchor_left = 1.0
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -276.0
|
||||
margin_top = -9.5
|
||||
margin_right = -4.0
|
||||
margin_bottom = 10.5
|
||||
alignment = 2
|
||||
[node name="Money" type="HBoxContainer" parent="Controls/GUI/Status/Toolbar/Status"]
|
||||
margin_top = 42.0
|
||||
margin_right = 93.0
|
||||
margin_bottom = 56.0
|
||||
alignment = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="currencylbl" type="Label" parent="ui/base/gpanel/citystatus"]
|
||||
margin_left = 252.0
|
||||
margin_top = 3.0
|
||||
margin_right = 259.0
|
||||
margin_bottom = 17.0
|
||||
[node name="CurrencyLbl" type="Label" parent="Controls/GUI/Status/Toolbar/Status/Money"]
|
||||
margin_left = 36.0
|
||||
margin_right = 43.0
|
||||
margin_bottom = 14.0
|
||||
text = "§"
|
||||
|
||||
[node name="moneylbl" type="Label" parent="ui/base/gpanel/citystatus"]
|
||||
margin_left = 263.0
|
||||
margin_top = 3.0
|
||||
margin_right = 272.0
|
||||
margin_bottom = 17.0
|
||||
[node name="MoneyLbl" type="Label" parent="Controls/GUI/Status/Toolbar/Status/Money"]
|
||||
margin_left = 47.0
|
||||
margin_right = 56.0
|
||||
margin_bottom = 14.0
|
||||
text = "#"
|
||||
|
||||
[node name="debugbtn" type="Button" parent="ui/base/gpanel"]
|
||||
visible = false
|
||||
margin_left = 932.754
|
||||
margin_top = 563.202
|
||||
margin_right = 985.754
|
||||
margin_bottom = 583.202
|
||||
text = "Debug"
|
||||
[node name="PoliceBtn" type="TextureButton" parent="Controls/GUI/Status/Toolbar"]
|
||||
margin_left = 97.0
|
||||
margin_right = 145.0
|
||||
margin_bottom = 66.0
|
||||
texture_normal = ExtResource( 5 )
|
||||
|
||||
[node name="FireBtn" type="TextureButton" parent="Controls/GUI/Status/Toolbar"]
|
||||
margin_left = 149.0
|
||||
margin_right = 197.0
|
||||
margin_bottom = 66.0
|
||||
texture_normal = ExtResource( 6 )
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://scripts/newgame.gd" type="Script" id=1]
|
||||
|
||||
[node name="SartMenu" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
margin_left = 312.0
|
||||
margin_top = 235.0
|
||||
margin_right = 601.0
|
||||
margin_bottom = 249.0
|
||||
text = "Welcome to City Limits!"
|
||||
align = 1
|
||||
|
||||
[node name="CityNameEdit" type="LineEdit" parent="."]
|
||||
margin_left = 312.0
|
||||
margin_top = 261.0
|
||||
margin_right = 601.0
|
||||
margin_bottom = 285.0
|
||||
text = "City Name"
|
||||
align = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="BudgetMenu" type="MenuButton" parent="."]
|
||||
margin_left = 312.0
|
||||
margin_top = 294.0
|
||||
margin_right = 601.0
|
||||
margin_bottom = 314.0
|
||||
text = "Starting Budget"
|
||||
items = [ "20000", null, 0, false, false, 0, 0, null, "", false, "10000", null, 0, false, false, 1, 0, null, "", false, "500", null, 0, false, false, 2, 0, null, "", false ]
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="CreateBtn" type="Button" parent="."]
|
||||
margin_left = 312.0
|
||||
margin_top = 319.0
|
||||
margin_right = 601.0
|
||||
margin_bottom = 339.0
|
||||
text = "Create"
|
||||
|
||||
[connection signal="pressed" from="CreateBtn" to="." method="_on_CreateBtn_pressed"]
|
Loading…
Add table
Add a link
Reference in a new issue