mirror of
https://github.com/tonytins/citylimits.git
synced 2025-03-22 07:22:20 +00:00
World is now seperate scene
This commit is contained in:
parent
9ba66410a4
commit
7845b1f08f
3 changed files with 13 additions and 6 deletions
10
src/game.tscn
Normal file
10
src/game.tscn
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[gd_scene load_steps=3 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://src/world.tscn" type="PackedScene" id=1]
|
||||||
|
[ext_resource path="res://src/gui.tscn" type="PackedScene" id=2]
|
||||||
|
|
||||||
|
[node name="Game" type="Node"]
|
||||||
|
|
||||||
|
[node name="World" parent="." instance=ExtResource( 1 )]
|
||||||
|
|
||||||
|
[node name="GUI" parent="." instance=ExtResource( 2 )]
|
|
@ -4,4 +4,4 @@ func _on_CreateBtn_pressed():
|
||||||
var city_name = $CityNameEdit.text
|
var city_name = $CityNameEdit.text
|
||||||
CityData.city_name = city_name
|
CityData.city_name = city_name
|
||||||
|
|
||||||
get_tree().change_scene("res://src/world.tscn")
|
get_tree().change_scene("res://src/game.tscn")
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
[gd_scene load_steps=5 format=2]
|
[gd_scene load_steps=4 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://assets/terrian.tres" type="TileSet" id=1]
|
[ext_resource path="res://assets/terrian.tres" type="TileSet" id=1]
|
||||||
[ext_resource path="res://src/gui.tscn" type="PackedScene" id=2]
|
|
||||||
[ext_resource path="res://src/world.gd" type="Script" id=3]
|
[ext_resource path="res://src/world.gd" type="Script" id=3]
|
||||||
[ext_resource path="res://assets/water.tres" type="TileSet" id=4]
|
[ext_resource path="res://assets/water.tres" type="TileSet" id=4]
|
||||||
|
|
||||||
[node name="Node2D" type="Node"]
|
[node name="World" type="Node"]
|
||||||
script = ExtResource( 3 )
|
script = ExtResource( 3 )
|
||||||
|
|
||||||
[node name="Water" type="TileMap" parent="."]
|
[node name="Water" type="TileMap" parent="."]
|
||||||
|
@ -17,5 +16,3 @@ format = 1
|
||||||
tile_set = ExtResource( 1 )
|
tile_set = ExtResource( 1 )
|
||||||
cell_size = Vector2( 16, 16 )
|
cell_size = Vector2( 16, 16 )
|
||||||
format = 1
|
format = 1
|
||||||
|
|
||||||
[node name="GUI" parent="." instance=ExtResource( 2 )]
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue