From db701d79c6410129f9f962b8b4d91613cf2b2745 Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Sun, 11 Jun 2023 14:49:51 -0400 Subject: [PATCH] ! --- buildings/arms_building.cs | 8 +++--- buildings/arms_buildings/nuke.tscn | 4 +-- buildings/kash_building.cs | 4 +-- buildings/kash_buildings/factory.tscn | 2 +- buildings/propaganda_building.cs | 4 +-- .../propaganda_buildings/radiotower.tscn | 5 ++-- levels/test_level.tscn | 4 +-- menu/start_game_menu.tscn | 8 +++--- player/player.cs | 6 +++-- player/player.tscn | 26 +++++++++++++++++-- 10 files changed, 47 insertions(+), 24 deletions(-) diff --git a/buildings/arms_building.cs b/buildings/arms_building.cs index bdaa5d2..fafbbb7 100644 --- a/buildings/arms_building.cs +++ b/buildings/arms_building.cs @@ -2,8 +2,8 @@ using Godot; public partial class arms_building : base_building { - [Export] - public int Megaton { get; set; } = 1; - [Export] - public int ApprovalDrop { get; set; } = 1; + [Export] + public int Megaton { get; set; } = 1; + [Export] + public int Approval { get; set; } = 1; } diff --git a/buildings/arms_buildings/nuke.tscn b/buildings/arms_buildings/nuke.tscn index a8b9c60..37f89d4 100644 --- a/buildings/arms_buildings/nuke.tscn +++ b/buildings/arms_buildings/nuke.tscn @@ -1,14 +1,14 @@ [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="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"] [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) script = ExtResource("1_wbsyl") Megaton = 10 -ApprovalDrop = 5 +Approval = -5 BlocksNode = NodePath("blocks") DisplayName = "Radio Tower" KashCost = 30 diff --git a/buildings/kash_building.cs b/buildings/kash_building.cs index 6ca237e..5fb9d46 100644 --- a/buildings/kash_building.cs +++ b/buildings/kash_building.cs @@ -2,6 +2,6 @@ using Godot; public partial class kash_building : base_building { - [Export] - public int KashGenPerSec { get; set; } = 1; + [Export] + public int KashGenPerSec { get; set; } = 1; } diff --git a/buildings/kash_buildings/factory.tscn b/buildings/kash_buildings/factory.tscn index 419839a..8aecd0f 100644 --- a/buildings/kash_buildings/factory.tscn +++ b/buildings/kash_buildings/factory.tscn @@ -1,7 +1,7 @@ [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="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"] [node name="factory" type="Node3D" node_paths=PackedStringArray("BlocksNode")] diff --git a/buildings/propaganda_building.cs b/buildings/propaganda_building.cs index fe0a79b..38151da 100644 --- a/buildings/propaganda_building.cs +++ b/buildings/propaganda_building.cs @@ -2,6 +2,6 @@ using Godot; public partial class propaganda_building : base_building { - [Export] - public int ApprovalGain { get; set; } = 1; + [Export] + public int Approval { get; set; } = 1; } diff --git a/buildings/propaganda_buildings/radiotower.tscn b/buildings/propaganda_buildings/radiotower.tscn index eb08d80..ce32bb1 100644 --- a/buildings/propaganda_buildings/radiotower.tscn +++ b/buildings/propaganda_buildings/radiotower.tscn @@ -1,13 +1,12 @@ [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="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"] -[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) script = ExtResource("1_oo36g") -ApprovalGain = 10 BlocksNode = NodePath("blocks") DisplayName = "Radio Tower" KashCost = 5 diff --git a/levels/test_level.tscn b/levels/test_level.tscn index e7be2d2..8f71af2 100644 --- a/levels/test_level.tscn +++ b/levels/test_level.tscn @@ -1,8 +1,8 @@ [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="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"] [sub_resource type="Environment" id="Environment_lo4sd"] diff --git a/menu/start_game_menu.tscn b/menu/start_game_menu.tscn index 8850a62..4249aa7 100644 --- a/menu/start_game_menu.tscn +++ b/menu/start_game_menu.tscn @@ -1,10 +1,10 @@ [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="Texture2D" uid="uid://bd7j1ug5gs26w" 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://ds7ec1n3pytnr" 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="Texture2D" uid="uid://b44vs2lwgnh37" path="res://images/mushroom_cloud001.webp" id="2_aky60"] +[ext_resource type="AudioStream" uid="uid://ckg5eypyrhidg" path="res://music/I Feel Grunge (Slow).wav" id="2_yw57x"] +[ext_resource type="AudioStream" uid="uid://c8dcqkmytnyay" path="res://audio/btn.wav" id="4_fx2mk"] +[ext_resource type="AudioStream" uid="uid://dja6tipmq1m8l" path="res://audio/dot.wav" id="5_y8gc7"] [sub_resource type="LabelSettings" id="LabelSettings_n38oc"] font_size = 290 diff --git a/player/player.cs b/player/player.cs index 562bfdc..9724da2 100644 --- a/player/player.cs +++ b/player/player.cs @@ -41,7 +41,7 @@ public partial class player : Camera3D { get => _chatter.Get("text").ToString(); set { - if (!(bool)_tmrChtr.Get("is_stopped") && value != "") + if (value != "") _sndChtr.Play(); _chatter.Set("text", value); _tmrChtr.Start(); @@ -62,7 +62,9 @@ public partial class player : Camera3D } _tmrChtr.Start(); _tmrChtr.Timeout += () => Chatter = ""; - _tmrCashGen.Timeout += MakeMoney; + _tmrCashGen.Timeout += MakeMoney; + + Chatter = "The enemy is stockpiling weapons of mass destruction."; } public override void _Process(double delta) diff --git a/player/player.tscn b/player/player.tscn index fa9d78a..cd0b0fc 100644 --- a/player/player.tscn +++ b/player/player.tscn @@ -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="AudioStream" uid="uid://dye3nhm41yk6r" path="res://audio/chatter.wav" id="2_sa1qd"] @@ -61,6 +61,9 @@ gradient = SubResource("Gradient_od2su") width = 24 height = 255 +[sub_resource type="LabelSettings" id="LabelSettings_adeuk"] +font_size = 12 + [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")] @@ -129,7 +132,6 @@ offset_right = 221.0 offset_bottom = 121.5 grow_horizontal = 2 grow_vertical = 2 -text = "The enemy is stockpiling weapons of mass destruction." label_settings = SubResource("LabelSettings_pws5q") autowrap_mode = 3 @@ -321,6 +323,24 @@ grow_vertical = 0 rotation = 1.5708 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="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1.17786) target_position = Vector3(0, 0, -999) @@ -335,6 +355,8 @@ skeleton = NodePath("../..") [node name="snd_Chatter" type="AudioStreamPlayer" parent="."] stream = ExtResource("2_sa1qd") +volume_db = -20.771 +pitch_scale = 0.88 [node name="snd_Button" type="AudioStreamPlayer" parent="."] stream = ExtResource("3_00x5l")