mirror of
https://github.com/tpawstdio/skyscraperrising.git
synced 2025-06-25 01:24:43 -04:00
Initial source commit
This commit is contained in:
commit
5d90700bdc
16 changed files with 1042 additions and 0 deletions
6
project/assets/office.tscn
Normal file
6
project/assets/office.tscn
Normal file
|
@ -0,0 +1,6 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://src/office.gd" type="Script" id=1]
|
||||
|
||||
[node name="Office" type="Node2D"]
|
||||
script = ExtResource( 1 )
|
7
project/default_env.tres
Normal file
7
project/default_env.tres
Normal file
|
@ -0,0 +1,7 @@
|
|||
[gd_resource type="Environment" load_steps=2 format=2]
|
||||
|
||||
[sub_resource type="ProceduralSky" id=1]
|
||||
|
||||
[resource]
|
||||
background_mode = 2
|
||||
background_sky = SubResource( 1 )
|
BIN
project/icon.png
Normal file
BIN
project/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
34
project/icon.png.import
Normal file
34
project/icon.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.png"
|
||||
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
31
project/project.godot
Normal file
31
project/project.godot
Normal file
|
@ -0,0 +1,31 @@
|
|||
; Engine configuration file.
|
||||
; It's best edited using the editor UI and not directly,
|
||||
; since the parameters that go here are not all obvious.
|
||||
;
|
||||
; Format:
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=4
|
||||
|
||||
_global_script_classes=[ ]
|
||||
_global_script_class_icons={
|
||||
|
||||
}
|
||||
|
||||
[application]
|
||||
|
||||
config/name="Elecoms Tower"
|
||||
run/main_scene="res://src/titlescreen.tscn"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[autoload]
|
||||
|
||||
TowerData="*res://src/autoload/twrdata.gd"
|
||||
|
||||
[rendering]
|
||||
|
||||
quality/driver/driver_name="GLES2"
|
||||
vram_compression/import_etc=true
|
||||
vram_compression/import_etc2=false
|
||||
environment/default_environment="res://default_env.tres"
|
16
project/src/autoload/twrdata.gd
Normal file
16
project/src/autoload/twrdata.gd
Normal file
|
@ -0,0 +1,16 @@
|
|||
extends Node
|
||||
|
||||
var tower_name: String
|
||||
|
||||
var budget: int
|
||||
var prev_budget: int
|
||||
|
||||
func starting_budget(lev: int):
|
||||
|
||||
if lev == 3:
|
||||
budget = 5000
|
||||
elif lev == 2:
|
||||
budget = 10000
|
||||
# Default to easy mode
|
||||
else:
|
||||
budget = 20000
|
7
project/src/gpanel.gd
Normal file
7
project/src/gpanel.gd
Normal file
|
@ -0,0 +1,7 @@
|
|||
extends Panel
|
||||
|
||||
func _ready():
|
||||
$TwrMenus/TwrNameLbl.text = TowerData.tower_name
|
||||
|
||||
func _process(delta):
|
||||
$TwrMenus/MoneyLbl.text = str(TowerData.budget)
|
13
project/src/gui.gd
Normal file
13
project/src/gui.gd
Normal file
|
@ -0,0 +1,13 @@
|
|||
extends Control
|
||||
|
||||
|
||||
func _ready():
|
||||
$WelcomeDlg.show()
|
||||
$GPanel/TwrMenus/TwrNameLbl.text = TowerData.tower_name
|
||||
|
||||
func _process(delta):
|
||||
# $GPanel/TwrMenus/MoneyLbl.text = str(TowerData.budget)
|
||||
pass
|
||||
|
||||
func _on_WelcomeDlg_confirmed():
|
||||
$WelcomeDlg.hide()
|
105
project/src/gui.tscn
Normal file
105
project/src/gui.tscn
Normal file
|
@ -0,0 +1,105 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://src/gui.gd" type="Script" id=1]
|
||||
|
||||
[node name="GUI" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="GPanel" type="Panel" parent="."]
|
||||
anchor_right = 1.0
|
||||
margin_bottom = 23.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="TwrMenus" 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="TwrNameLbl" type="Label" parent="GPanel/TwrMenus"]
|
||||
margin_top = 3.0
|
||||
margin_right = 80.0
|
||||
margin_bottom = 17.0
|
||||
text = "Tower Name"
|
||||
|
||||
[node name="GameSpeed" type="MenuButton" parent="GPanel/TwrMenus"]
|
||||
margin_left = 84.0
|
||||
margin_right = 177.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="TwrStatus" 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/TwrStatus"]
|
||||
margin_left = 251.0
|
||||
margin_top = 3.0
|
||||
margin_right = 259.0
|
||||
margin_bottom = 17.0
|
||||
text = "$"
|
||||
|
||||
[node name="MoneyLbl" type="Label" parent="GPanel/TwrStatus"]
|
||||
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"
|
||||
|
||||
[node name="WelcomeDlg" type="AcceptDialog" parent="."]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -131.5
|
||||
margin_top = -69.0
|
||||
margin_right = 131.5
|
||||
margin_bottom = 69.0
|
||||
window_title = "Welcome to Elecoms"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="WelcomeLbl" type="RichTextLabel" parent="WelcomeDlg"]
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
margin_left = -125.5
|
||||
margin_top = 5.0
|
||||
margin_right = 129.5
|
||||
margin_bottom = 102.0
|
||||
text = "Elecoms Corp. has invited you to build their next regional HQ. You've been given creative liberty over the design as long you assign an office to them."
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
[connection signal="confirmed" from="WelcomeDlg" to="." method="_on_WelcomeDlg_confirmed"]
|
7
project/src/newgame.gd
Normal file
7
project/src/newgame.gd
Normal file
|
@ -0,0 +1,7 @@
|
|||
extends Control
|
||||
|
||||
func _on_CreateBtn_pressed():
|
||||
var tower_name = $TwrNameEdit.text
|
||||
TowerData.tower_name = tower_name
|
||||
|
||||
get_tree().change_scene("res://src/world.tscn")
|
9
project/src/office.gd
Normal file
9
project/src/office.gd
Normal file
|
@ -0,0 +1,9 @@
|
|||
extends Node2D
|
||||
|
||||
const OFFICE_PRICE = 1000
|
||||
const MAINTANCE_COST = 350
|
||||
|
||||
func _ready():
|
||||
# Once placed in-world, it'll substract from your budget
|
||||
if TowerData.budget >= OFFICE_PRICE:
|
||||
TowerData.budget = -OFFICE_PRICE
|
49
project/src/titlescreen.tscn
Normal file
49
project/src/titlescreen.tscn
Normal file
|
@ -0,0 +1,49 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://src/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="TwrNameEdit" 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"]
|
7
project/src/world.tscn
Normal file
7
project/src/world.tscn
Normal file
|
@ -0,0 +1,7 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://src/gui.tscn" type="PackedScene" id=2]
|
||||
|
||||
[node name="World" type="Node"]
|
||||
|
||||
[node name="GUI" parent="." instance=ExtResource( 2 )]
|
Loading…
Add table
Add a link
Reference in a new issue