mirror of
https://github.com/tonytins/citylimits
synced 2025-06-25 09:24:44 -04:00
Merged varies scenes into game scene
- Merged GUI and world scenes into game scene with the GUI existing on a canvas layer - Ported over camera movement script
This commit is contained in:
parent
f5c7355d5a
commit
8a40969703
6 changed files with 171 additions and 113 deletions
104
scenes/game.tscn
104
scenes/game.tscn
|
@ -1,12 +1,104 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://scenes/world.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://scenes/gui.tscn" type="PackedScene" id=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]
|
||||
|
||||
[node name="game" type="Node"]
|
||||
|
||||
[node name="world" type="Node2D" parent="."]
|
||||
script = ExtResource( 4 )
|
||||
|
||||
[node name="Game" type="Node"]
|
||||
[node name="water" type="TileMap" parent="world"]
|
||||
tile_set = ExtResource( 1 )
|
||||
cell_size = Vector2( 16, 16 )
|
||||
format = 1
|
||||
|
||||
[node name="World" parent="." instance=ExtResource( 1 )]
|
||||
[node name="terrian" type="TileMap" parent="world"]
|
||||
tile_set = ExtResource( 3 )
|
||||
cell_size = Vector2( 16, 16 )
|
||||
format = 1
|
||||
|
||||
[node name="GUI" parent="." instance=ExtResource( 2 )]
|
||||
[node name="Camera2D" type="Camera2D" parent="world"]
|
||||
position = Vector2( 503.506, 302.104 )
|
||||
current = true
|
||||
script = ExtResource( 5 )
|
||||
|
||||
[node name="ui" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="base" type="Control" parent="ui"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="gpanel" type="Panel" parent="ui/base"]
|
||||
anchor_right = 1.0
|
||||
margin_bottom = 23.0
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[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
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="citynamelbl" type="Label" parent="ui/base/gpanel/citymenus"]
|
||||
margin_top = 3.0
|
||||
margin_right = 66.0
|
||||
margin_bottom = 17.0
|
||||
text = "City Name"
|
||||
|
||||
[node name="gamespeed" type="MenuButton" parent="ui/base/gpanel/citymenus"]
|
||||
margin_left = 70.0
|
||||
margin_right = 163.0
|
||||
margin_bottom = 20.0
|
||||
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
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="currencylbl" type="Label" parent="ui/base/gpanel/citystatus"]
|
||||
margin_left = 251.0
|
||||
margin_top = 3.0
|
||||
margin_right = 259.0
|
||||
margin_bottom = 17.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
|
||||
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"
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://scripts/gpanel.gd" type="Script" id=2]
|
||||
|
||||
|
||||
[node name="GUI" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="GPanel" type="Panel" parent="."]
|
||||
anchor_right = 1.0
|
||||
margin_bottom = 23.0
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="CityMenus" type="HBoxContainer" parent="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
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="CityNameLbl" type="Label" parent="GPanel/CityMenus"]
|
||||
margin_top = 3.0
|
||||
margin_right = 66.0
|
||||
margin_bottom = 17.0
|
||||
text = "City Name"
|
||||
|
||||
[node name="GameSpeed" type="MenuButton" parent="GPanel/CityMenus"]
|
||||
margin_left = 70.0
|
||||
margin_right = 163.0
|
||||
margin_bottom = 20.0
|
||||
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="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
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="CurrencyLbl" type="Label" parent="GPanel/CityStatus"]
|
||||
margin_left = 251.0
|
||||
margin_top = 3.0
|
||||
margin_right = 259.0
|
||||
margin_bottom = 17.0
|
||||
text = "$"
|
||||
|
||||
[node name="MoneyLbl" type="Label" parent="GPanel/CityStatus"]
|
||||
margin_left = 263.0
|
||||
margin_top = 3.0
|
||||
margin_right = 272.0
|
||||
margin_bottom = 17.0
|
||||
text = "#"
|
||||
|
||||
[node name="DebugBtn" type="Button" parent="GPanel"]
|
||||
visible = false
|
||||
margin_left = 932.754
|
||||
margin_top = 563.202
|
||||
margin_right = 985.754
|
||||
margin_bottom = 583.202
|
||||
text = "Debug"
|
|
@ -1,20 +0,0 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://sprites/terrian.tres" type="TileSet" id=1]
|
||||
[ext_resource path="res://scripts/world.gd" type="Script" id=3]
|
||||
[ext_resource path="res://sprites/water.tres" type="TileSet" id=4]
|
||||
|
||||
|
||||
|
||||
[node name="World" type="Node"]
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="Water" type="TileMap" parent="."]
|
||||
tile_set = ExtResource( 4 )
|
||||
cell_size = Vector2( 16, 16 )
|
||||
format = 1
|
||||
|
||||
[node name="Terrian" type="TileMap" parent="."]
|
||||
tile_set = ExtResource( 1 )
|
||||
cell_size = Vector2( 16, 16 )
|
||||
format = 1
|
Loading…
Add table
Add a link
Reference in a new issue