From 69393115af4c9e4f62a3ba0ef246fa39ac809e08 Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Sat, 10 Jun 2023 18:41:49 -0400 Subject: [PATCH 1/2] esfsfs --- player/player.cs | 11 ++-- player/player.tscn | 123 +++++++++++++++++++++++++++++++++++++++++---- project.godot | 6 +++ 3 files changed, 126 insertions(+), 14 deletions(-) diff --git a/player/player.cs b/player/player.cs index e34bcab..c8556b1 100644 --- a/player/player.cs +++ b/player/player.cs @@ -4,10 +4,14 @@ using System; public partial class player : Camera3D { private const string _path = "/root/player/"; - //private Camera3D _cam; - [Export] - private Label _con; + private bool _mUp, _mDown, _mLeft, _mRight, _wIn, _wOut; + [Export] + private TextureProgressBar _nuke, _pr, _kash; + + private float Nuke { get => (float)_nuke.Value; set => _nuke.Value = value; } + private float PR { get => (float)_pr.Value; set => _pr.Value = value; } + private float Kash { get => (float)_kash.Value; set => _kash.Value = value; } // Called when the node enters the scene tree for the first time. public override void _Ready() @@ -49,7 +53,6 @@ public partial class player : Camera3D if (_wOut && zout) this.Translate(new Vector3(0, 0, (float)delta*10)); - _con.Set("text", this.Position); } public override void _Input(InputEvent @event) diff --git a/player/player.tscn b/player/player.tscn index 58d1dd2..acc9c31 100644 --- a/player/player.tscn +++ b/player/player.tscn @@ -1,14 +1,117 @@ -[gd_scene load_steps=2 format=3 uid="uid://b5gb5paiupum"] +[gd_scene load_steps=17 format=3 uid="uid://b5gb5paiupum"] [ext_resource type="Script" path="res://player/player.cs" id="1_of2l4"] -[node name="player" type="Camera3D" node_paths=PackedStringArray("_con")] -script = ExtResource("1_of2l4") -_con = NodePath("Label") +[sub_resource type="CameraAttributesPhysical" id="CameraAttributesPhysical_1ejpb"] +frustum_near = 0.032 -[node name="Label" type="Label" parent="."] -offset_left = 313.0 -offset_top = 156.0 -offset_right = 402.0 -offset_bottom = 182.0 -text = "Eat ze caca." +[sub_resource type="Gradient" id="Gradient_hcpag"] +interpolation_mode = 2 +colors = PackedColorArray(1, 0, 0, 1, 0.35782, 0, 0.0248139, 1) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_y5odr"] +gradient = SubResource("Gradient_hcpag") +fill_to = Vector2(0.858974, 0.615385) + +[sub_resource type="Gradient" id="Gradient_camjl"] +colors = PackedColorArray(0.908061, 0.573562, 0.518565, 1, 1, 0.723217, 0.716857, 1) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_2xkee"] +gradient = SubResource("Gradient_camjl") +width = 24 +height = 255 + +[sub_resource type="Gradient" id="Gradient_dxeak"] +offsets = PackedFloat32Array(0, 0.505102) +colors = PackedColorArray(0.40573, 0, 0.0891716, 1, 0.723982, 3.15978e-05, 0.0896176, 1) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_d5w6a"] +gradient = SubResource("Gradient_dxeak") +width = 24 +height = 255 + +[sub_resource type="Gradient" id="Gradient_tpani"] +colors = PackedColorArray(0.893472, 0.979245, 1, 1, 0.347927, 0.885716, 1, 1) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_7myfq"] +gradient = SubResource("Gradient_tpani") +width = 24 +height = 255 + +[sub_resource type="Gradient" id="Gradient_127f1"] +colors = PackedColorArray(0.00784314, 0.152941, 0.454902, 1, 0.349457, 0.500016, 1, 1) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_kdame"] +gradient = SubResource("Gradient_127f1") +width = 24 +height = 255 + +[sub_resource type="Gradient" id="Gradient_psl0d"] +colors = PackedColorArray(0, 0.933055, 0.58552, 1, 0.793971, 1, 0.891535, 1) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_18k81"] +gradient = SubResource("Gradient_psl0d") +width = 24 +height = 255 + +[sub_resource type="Gradient" id="Gradient_od2su"] +colors = PackedColorArray(0, 0.947172, 0.724301, 1, 1.8771e-06, 0.766586, 0.320037, 1) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_nfg3s"] +gradient = SubResource("Gradient_od2su") +width = 24 +height = 255 + +[node name="player" type="Camera3D" node_paths=PackedStringArray("_nuke", "_pr", "_kash")] +attributes = SubResource("CameraAttributesPhysical_1ejpb") +script = ExtResource("1_of2l4") +_nuke = NodePath("NukeBar") +_pr = NodePath("PrBar") +_kash = NodePath("KashBar") + +[node name="Button" type="Button" parent="."] +offset_left = 1772.0 +offset_top = 926.0 +offset_right = 1904.0 +offset_bottom = 1058.0 +text = "BOOM" +icon = SubResource("GradientTexture2D_y5odr") +flat = true +icon_alignment = 1 +expand_icon = true + +[node name="NukeBar" type="TextureProgressBar" parent="."] +offset_left = 1817.0 +offset_top = 664.0 +offset_right = 1841.0 +offset_bottom = 919.0 +value = 50.0 +rounded = true +fill_mode = 3 +texture_under = SubResource("GradientTexture2D_2xkee") +texture_progress = SubResource("GradientTexture2D_d5w6a") +tint_progress = Color(0.239216, 0.239216, 0.239216, 1) + +[node name="PrBar" type="TextureProgressBar" parent="."] +offset_left = 1845.0 +offset_top = 664.0 +offset_right = 1869.0 +offset_bottom = 919.0 +value = 50.0 +rounded = true +fill_mode = 3 +texture_under = SubResource("GradientTexture2D_7myfq") +texture_progress = SubResource("GradientTexture2D_kdame") +tint_progress = Color(0.239216, 0.239216, 0.239216, 1) + +[node name="KashBar" type="TextureProgressBar" parent="."] +offset_left = 1873.0 +offset_top = 664.0 +offset_right = 1897.0 +offset_bottom = 919.0 +value = 50.0 +rounded = true +fill_mode = 3 +texture_under = SubResource("GradientTexture2D_18k81") +texture_progress = SubResource("GradientTexture2D_nfg3s") +tint_progress = Color(0.239216, 0.239216, 0.239216, 1) diff --git a/project.godot b/project.godot index 09a12bf..6bf3cc1 100644 --- a/project.godot +++ b/project.godot @@ -51,3 +51,9 @@ CamEast={ , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"echo":false,"script":null) ] } + +[rendering] + +anti_aliasing/quality/msaa_2d=1 +anti_aliasing/quality/msaa_3d=1 +anti_aliasing/quality/screen_space_aa=1 From 82a2d84dc7826a3c8afec7e17a7ba6c9593ebbf7 Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Sat, 10 Jun 2023 19:44:27 -0400 Subject: [PATCH 2/2] pray --- levels/test_level.tscn | 3 +++ player/player.cs | 2 ++ player/player.tscn | 34 ++++++++++++++++++++++++++++------ 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/levels/test_level.tscn b/levels/test_level.tscn index 6fc9ccf..bea8f45 100644 --- a/levels/test_level.tscn +++ b/levels/test_level.tscn @@ -17,3 +17,6 @@ metadata/_editor_floor_ = Vector3(0, 0, 0) [node name="player" parent="." instance=ExtResource("2_ojnju")] transform = Transform3D(1, 0, 0, 0, 0.388867, 0.921294, 0, -0.921294, 0.388867, -2.76897, 18.3017, 8.82022) +attributes = null +fov = 37.8493 +near = 0.032 diff --git a/player/player.cs b/player/player.cs index c8556b1..f30c870 100644 --- a/player/player.cs +++ b/player/player.cs @@ -13,6 +13,8 @@ public partial class player : Camera3D private float PR { get => (float)_pr.Value; set => _pr.Value = value; } private float Kash { get => (float)_kash.Value; set => _kash.Value = value; } + + // Called when the node enters the scene tree for the first time. public override void _Ready() { diff --git a/player/player.tscn b/player/player.tscn index acc9c31..6896430 100644 --- a/player/player.tscn +++ b/player/player.tscn @@ -22,8 +22,7 @@ width = 24 height = 255 [sub_resource type="Gradient" id="Gradient_dxeak"] -offsets = PackedFloat32Array(0, 0.505102) -colors = PackedColorArray(0.40573, 0, 0.0891716, 1, 0.723982, 3.15978e-05, 0.0896176, 1) +colors = PackedColorArray(0.533956, 4.45209e-07, 0.129296, 1, 0.902273, 0.0004242, 0.128051, 1) [sub_resource type="GradientTexture2D" id="GradientTexture2D_d5w6a"] gradient = SubResource("Gradient_dxeak") @@ -55,7 +54,7 @@ width = 24 height = 255 [sub_resource type="Gradient" id="Gradient_od2su"] -colors = PackedColorArray(0, 0.947172, 0.724301, 1, 1.8771e-06, 0.766586, 0.320037, 1) +colors = PackedColorArray(1.44392e-06, 0.334951, 0.24823, 1, 1.8771e-06, 0.766586, 0.320037, 1) [sub_resource type="GradientTexture2D" id="GradientTexture2D_nfg3s"] gradient = SubResource("Gradient_od2su") @@ -90,7 +89,6 @@ rounded = true fill_mode = 3 texture_under = SubResource("GradientTexture2D_2xkee") texture_progress = SubResource("GradientTexture2D_d5w6a") -tint_progress = Color(0.239216, 0.239216, 0.239216, 1) [node name="PrBar" type="TextureProgressBar" parent="."] offset_left = 1845.0 @@ -102,7 +100,6 @@ rounded = true fill_mode = 3 texture_under = SubResource("GradientTexture2D_7myfq") texture_progress = SubResource("GradientTexture2D_kdame") -tint_progress = Color(0.239216, 0.239216, 0.239216, 1) [node name="KashBar" type="TextureProgressBar" parent="."] offset_left = 1873.0 @@ -114,4 +111,29 @@ rounded = true fill_mode = 3 texture_under = SubResource("GradientTexture2D_18k81") texture_progress = SubResource("GradientTexture2D_nfg3s") -tint_progress = Color(0.239216, 0.239216, 0.239216, 1) + +[node name="lbl_Nukes" type="Label" parent="."] +offset_left = 1842.0 +offset_top = 757.0 +offset_right = 2107.0 +offset_bottom = 783.0 +rotation = 1.5708 +text = "WMDs" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="lbl_PR" type="Label" parent="."] +offset_left = 1869.0 +offset_top = 894.0 +offset_right = 1909.0 +offset_bottom = 920.0 +rotation = 1.5708 +text = "PR" + +[node name="lbl_Kash" type="Label" parent="."] +offset_left = 1897.0 +offset_top = 891.0 +offset_right = 1937.0 +offset_bottom = 917.0 +rotation = 1.5708 +text = "M$"