This commit is contained in:
MarcEricMartel 2023-06-11 14:49:51 -04:00
parent 5e3255bfc9
commit db701d79c6
10 changed files with 47 additions and 24 deletions

View File

@ -2,8 +2,8 @@ using Godot;
public partial class arms_building : base_building public partial class arms_building : base_building
{ {
[Export] [Export]
public int Megaton { get; set; } = 1; public int Megaton { get; set; } = 1;
[Export] [Export]
public int ApprovalDrop { get; set; } = 1; public int Approval { get; set; } = 1;
} }

View File

@ -1,14 +1,14 @@
[gd_scene load_steps=4 format=3 uid="uid://bh6e2nxqswoqg"] [gd_scene load_steps=4 format=3 uid="uid://bh6e2nxqswoqg"]
[ext_resource type="Script" path="res://buildings/arms_building.cs" id="1_wbsyl"] [ext_resource type="Script" path="res://buildings/arms_building.cs" id="1_wbsyl"]
[ext_resource type="PackedScene" uid="uid://py8i4xd737su" path="res://assets/meshes/nuke.tscn" id="2_upv26"] [ext_resource type="PackedScene" path="res://assets/meshes/nuke.tscn" id="2_upv26"]
[ext_resource type="PackedScene" uid="uid://m3lrwoup4i4r" path="res://buildings/grass_block.tscn" id="3_xrkoj"] [ext_resource type="PackedScene" uid="uid://m3lrwoup4i4r" path="res://buildings/grass_block.tscn" id="3_xrkoj"]
[node name="radiotower" type="Node3D" node_paths=PackedStringArray("BlocksNode")] [node name="radiotower" type="Node3D" node_paths=PackedStringArray("BlocksNode")]
transform = Transform3D(-1, 0, -1.50996e-07, 0, 1, 0, 1.50996e-07, 0, -1, 0, 0, 0) transform = Transform3D(-1, 0, -1.50996e-07, 0, 1, 0, 1.50996e-07, 0, -1, 0, 0, 0)
script = ExtResource("1_wbsyl") script = ExtResource("1_wbsyl")
Megaton = 10 Megaton = 10
ApprovalDrop = 5 Approval = -5
BlocksNode = NodePath("blocks") BlocksNode = NodePath("blocks")
DisplayName = "Radio Tower" DisplayName = "Radio Tower"
KashCost = 30 KashCost = 30

View File

@ -2,6 +2,6 @@ using Godot;
public partial class kash_building : base_building public partial class kash_building : base_building
{ {
[Export] [Export]
public int KashGenPerSec { get; set; } = 1; public int KashGenPerSec { get; set; } = 1;
} }

View File

@ -1,7 +1,7 @@
[gd_scene load_steps=4 format=3 uid="uid://2pw0p13lcklv"] [gd_scene load_steps=4 format=3 uid="uid://2pw0p13lcklv"]
[ext_resource type="Script" path="res://buildings/kash_building.cs" id="1_bcr1q"] [ext_resource type="Script" path="res://buildings/kash_building.cs" id="1_bcr1q"]
[ext_resource type="PackedScene" uid="uid://bbxjweewwjrd4" path="res://assets/meshes/factory.tscn" id="2_st133"] [ext_resource type="PackedScene" path="res://assets/meshes/factory.tscn" id="2_st133"]
[ext_resource type="PackedScene" uid="uid://m3lrwoup4i4r" path="res://buildings/grass_block.tscn" id="3_4p2cy"] [ext_resource type="PackedScene" uid="uid://m3lrwoup4i4r" path="res://buildings/grass_block.tscn" id="3_4p2cy"]
[node name="factory" type="Node3D" node_paths=PackedStringArray("BlocksNode")] [node name="factory" type="Node3D" node_paths=PackedStringArray("BlocksNode")]

View File

@ -2,6 +2,6 @@ using Godot;
public partial class propaganda_building : base_building public partial class propaganda_building : base_building
{ {
[Export] [Export]
public int ApprovalGain { get; set; } = 1; public int Approval { get; set; } = 1;
} }

View File

@ -1,13 +1,12 @@
[gd_scene load_steps=4 format=3 uid="uid://b8f1n3hp1fdlm"] [gd_scene load_steps=4 format=3 uid="uid://b8f1n3hp1fdlm"]
[ext_resource type="Script" path="res://buildings/propaganda_building.cs" id="1_oo36g"] [ext_resource type="Script" path="res://buildings/propaganda_building.cs" id="1_oo36g"]
[ext_resource type="PackedScene" uid="uid://cy2sb2tms48ir" path="res://assets/meshes/radiotower.tscn" id="2_4131e"] [ext_resource type="PackedScene" path="res://assets/meshes/radiotower.tscn" id="2_4131e"]
[ext_resource type="PackedScene" uid="uid://m3lrwoup4i4r" path="res://buildings/grass_block.tscn" id="3_pn4dl"] [ext_resource type="PackedScene" uid="uid://m3lrwoup4i4r" path="res://buildings/grass_block.tscn" id="3_pn4dl"]
[node name="radiotower" type="Node3D" node_paths=PackedStringArray("BlocksNode")] [node name="radiotower2" type="Node3D" node_paths=PackedStringArray("BlocksNode")]
transform = Transform3D(-1, 0, -1.50996e-07, 0, 1, 0, 1.50996e-07, 0, -1, 0, 0, 0) transform = Transform3D(-1, 0, -1.50996e-07, 0, 1, 0, 1.50996e-07, 0, -1, 0, 0, 0)
script = ExtResource("1_oo36g") script = ExtResource("1_oo36g")
ApprovalGain = 10
BlocksNode = NodePath("blocks") BlocksNode = NodePath("blocks")
DisplayName = "Radio Tower" DisplayName = "Radio Tower"
KashCost = 5 KashCost = 5

View File

@ -1,8 +1,8 @@
[gd_scene load_steps=7 format=3 uid="uid://cbs0x36e3ranm"] [gd_scene load_steps=7 format=3 uid="uid://cbs0x36e3ranm"]
[ext_resource type="MeshLibrary" uid="uid://dwo1m72yajrb1" path="res://assets/tilesets/tileset.tres" id="1_l447d"] [ext_resource type="MeshLibrary" uid="uid://bo7ir5us230sa" path="res://assets/tilesets/tileset.tres" id="1_l447d"]
[ext_resource type="PackedScene" uid="uid://b5gb5paiupum" path="res://player/player.tscn" id="2_ojnju"] [ext_resource type="PackedScene" uid="uid://b5gb5paiupum" path="res://player/player.tscn" id="2_ojnju"]
[ext_resource type="AudioStream" uid="uid://byo1w5vecks0m" path="res://music/jazz.ogg" id="3_brvx4"] [ext_resource type="AudioStream" uid="uid://bba7tiqty57ek" path="res://music/jazz.ogg" id="3_brvx4"]
[ext_resource type="PackedScene" uid="uid://c2casdi4d2o3j" path="res://shaders/water_plane.tscn" id="3_ga7wg"] [ext_resource type="PackedScene" uid="uid://c2casdi4d2o3j" path="res://shaders/water_plane.tscn" id="3_ga7wg"]
[sub_resource type="Environment" id="Environment_lo4sd"] [sub_resource type="Environment" id="Environment_lo4sd"]

View File

@ -1,10 +1,10 @@
[gd_scene load_steps=10 format=3 uid="uid://4tym1auav4yv"] [gd_scene load_steps=10 format=3 uid="uid://4tym1auav4yv"]
[ext_resource type="Script" path="res://menu/start_game_menu.cs" id="1_0k2xm"] [ext_resource type="Script" path="res://menu/start_game_menu.cs" id="1_0k2xm"]
[ext_resource type="Texture2D" uid="uid://bd7j1ug5gs26w" path="res://images/mushroom_cloud001.webp" id="2_aky60"] [ext_resource type="Texture2D" uid="uid://b44vs2lwgnh37" path="res://images/mushroom_cloud001.webp" id="2_aky60"]
[ext_resource type="AudioStream" uid="uid://co52ygvp3wcra" path="res://music/I Feel Grunge (Slow).wav" id="2_yw57x"] [ext_resource type="AudioStream" uid="uid://ckg5eypyrhidg" path="res://music/I Feel Grunge (Slow).wav" id="2_yw57x"]
[ext_resource type="AudioStream" uid="uid://ds7ec1n3pytnr" path="res://audio/btn.wav" id="4_fx2mk"] [ext_resource type="AudioStream" uid="uid://c8dcqkmytnyay" path="res://audio/btn.wav" id="4_fx2mk"]
[ext_resource type="AudioStream" uid="uid://cg78xtngxrjlg" path="res://audio/dot.wav" id="5_y8gc7"] [ext_resource type="AudioStream" uid="uid://dja6tipmq1m8l" path="res://audio/dot.wav" id="5_y8gc7"]
[sub_resource type="LabelSettings" id="LabelSettings_n38oc"] [sub_resource type="LabelSettings" id="LabelSettings_n38oc"]
font_size = 290 font_size = 290

View File

@ -41,7 +41,7 @@ public partial class player : Camera3D
{ {
get => _chatter.Get("text").ToString(); set get => _chatter.Get("text").ToString(); set
{ {
if (!(bool)_tmrChtr.Get("is_stopped") && value != "") if (value != "")
_sndChtr.Play(); _sndChtr.Play();
_chatter.Set("text", value); _chatter.Set("text", value);
_tmrChtr.Start(); _tmrChtr.Start();
@ -62,7 +62,9 @@ public partial class player : Camera3D
} }
_tmrChtr.Start(); _tmrChtr.Start();
_tmrChtr.Timeout += () => Chatter = ""; _tmrChtr.Timeout += () => Chatter = "";
_tmrCashGen.Timeout += MakeMoney; _tmrCashGen.Timeout += MakeMoney;
Chatter = "The enemy is stockpiling weapons of mass destruction.";
} }
public override void _Process(double delta) public override void _Process(double delta)

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=20 format=3 uid="uid://b5gb5paiupum"] [gd_scene load_steps=21 format=3 uid="uid://b5gb5paiupum"]
[ext_resource type="Script" path="res://player/player.cs" id="1_of2l4"] [ext_resource type="Script" path="res://player/player.cs" id="1_of2l4"]
[ext_resource type="AudioStream" uid="uid://dye3nhm41yk6r" path="res://audio/chatter.wav" id="2_sa1qd"] [ext_resource type="AudioStream" uid="uid://dye3nhm41yk6r" path="res://audio/chatter.wav" id="2_sa1qd"]
@ -61,6 +61,9 @@ gradient = SubResource("Gradient_od2su")
width = 24 width = 24
height = 255 height = 255
[sub_resource type="LabelSettings" id="LabelSettings_adeuk"]
font_size = 12
[sub_resource type="SphereMesh" id="SphereMesh_mtv4x"] [sub_resource type="SphereMesh" id="SphereMesh_mtv4x"]
[node name="player" type="Camera3D" node_paths=PackedStringArray("_con", "_mousePosLabel", "_cursorPosLabel", "_cursor", "_cursorPoint", "_nuke", "_pr", "_kash", "_chatter", "_sndChtr", "_sndBtn", "_tmrChtr", "_tmrCashGen")] [node name="player" type="Camera3D" node_paths=PackedStringArray("_con", "_mousePosLabel", "_cursorPosLabel", "_cursor", "_cursorPoint", "_nuke", "_pr", "_kash", "_chatter", "_sndChtr", "_sndBtn", "_tmrChtr", "_tmrCashGen")]
@ -129,7 +132,6 @@ offset_right = 221.0
offset_bottom = 121.5 offset_bottom = 121.5
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
text = "The enemy is stockpiling weapons of mass destruction."
label_settings = SubResource("LabelSettings_pws5q") label_settings = SubResource("LabelSettings_pws5q")
autowrap_mode = 3 autowrap_mode = 3
@ -321,6 +323,24 @@ grow_vertical = 0
rotation = 1.5708 rotation = 1.5708
text = "KA$H" text = "KA$H"
[node name="Desc" type="Label" parent="HUD"]
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -535.0
offset_top = -194.0
offset_right = -134.0
offset_bottom = -134.0
grow_horizontal = 0
grow_vertical = 0
text = "Kash Flow: +2M$/sec. PR: +10%. Mtons: +10.
Cost: 6M$. Cost: 5M$. PR: -5%.
Cost: 30M$."
label_settings = SubResource("LabelSettings_adeuk")
[node name="cursor" type="RayCast3D" parent="."] [node name="cursor" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1.17786) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1.17786)
target_position = Vector3(0, 0, -999) target_position = Vector3(0, 0, -999)
@ -335,6 +355,8 @@ skeleton = NodePath("../..")
[node name="snd_Chatter" type="AudioStreamPlayer" parent="."] [node name="snd_Chatter" type="AudioStreamPlayer" parent="."]
stream = ExtResource("2_sa1qd") stream = ExtResource("2_sa1qd")
volume_db = -20.771
pitch_scale = 0.88
[node name="snd_Button" type="AudioStreamPlayer" parent="."] [node name="snd_Button" type="AudioStreamPlayer" parent="."]
stream = ExtResource("3_00x5l") stream = ExtResource("3_00x5l")