diff --git a/Enemies/GodCircuit.tscn b/Enemies/GodCircuit.tscn index 2259c77..851ed94 100644 --- a/Enemies/GodCircuit.tscn +++ b/Enemies/GodCircuit.tscn @@ -14,7 +14,7 @@ length = 0.5 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true -tracks/0/path = NodePath("god circuit stage 1/Cube:layers") +tracks/0/path = NodePath("StaticBody3D/god circuit stage 1/Cube:layers") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { @@ -26,7 +26,7 @@ tracks/0/keys = { tracks/1/type = "value" tracks/1/imported = false tracks/1/enabled = true -tracks/1/path = NodePath("god circuit stage 1/Cube2:layers") +tracks/1/path = NodePath("StaticBody3D/god circuit stage 1/Cube2:layers") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { @@ -53,7 +53,7 @@ length = 0.001 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true -tracks/0/path = NodePath("god circuit stage 1/Cube:layers") +tracks/0/path = NodePath("StaticBody3D/god circuit stage 1/Cube:layers") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { @@ -65,7 +65,7 @@ tracks/0/keys = { tracks/1/type = "value" tracks/1/imported = false tracks/1/enabled = true -tracks/1/path = NodePath("god circuit stage 1/Cube2:layers") +tracks/1/path = NodePath("StaticBody3D/god circuit stage 1/Cube2:layers") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { @@ -93,6 +93,9 @@ _data = { "RESET": SubResource("Animation_47f75") } +[sub_resource type="BoxShape3D" id="BoxShape3D_n2erm"] +size = Vector3(2.89997, 1, 5.5749) + [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_7b0kx"] resource_name = "Material.001" cull_mode = 2 @@ -133,11 +136,8 @@ shadow_mesh = SubResource("ArrayMesh_f3cka") render_priority = 0 shader = ExtResource("3_05w5o") -[sub_resource type="BoxShape3D" id="BoxShape3D_n2erm"] -size = Vector3(2.89997, 1, 5.5749) - [node name="God Circuit" type="Node3D" node_paths=PackedStringArray("_animationPlayer")] -transform = Transform3D(1, 0, 0, 0, 0.877012, 0.480468, 0, -0.480468, 0.877012, 0, 2.3872, 1.61832) +transform = Transform3D(1, 0, 0, 0, 0.877012, 0.480468, 0, -0.480468, 0.877012, 0, 1.29734, 0) script = ExtResource("1_gyfww") _animationPlayer = NodePath("AnimationPlayer") @@ -146,22 +146,8 @@ libraries = { "": SubResource("AnimationLibrary_qiwcq") } -[node name="god circuit stage 1" type="Node3D" parent="."] - -[node name="Cube" type="MeshInstance3D" parent="god circuit stage 1"] -transform = Transform3D(-1, 7.54979e-08, -7.54979e-08, -7.54979e-08, 0, 1, 7.54979e-08, 1, 0, -2.58153, 0, -1.66413) -mesh = SubResource("ArrayMesh_vv6dc") -skeleton = NodePath("") - -[node name="Cube2" type="MeshInstance3D" parent="god circuit stage 1"] -transform = Transform3D(-1, 7.54979e-08, -7.54979e-08, -7.54979e-08, 0, 1, 7.54979e-08, 1, 0, -2.58153, 0, -1.66413) -layers = 0 -material_override = SubResource("ShaderMaterial_aqrc7") -mesh = SubResource("ArrayMesh_vv6dc") -skeleton = NodePath("") - [node name="StaticBody3D" type="RigidBody3D" parent="."] -transform = Transform3D(-1, 7.54979e-08, -7.54979e-08, -7.54979e-08, 0, 1, 7.54979e-08, 1, 0, -2.58153, 0, -1.66413) +transform = Transform3D(-1, 7.54979e-08, -7.54979e-08, -7.54979e-08, 0, 1, 7.54979e-08, 1, 0, 0, 0, 0) collision_layer = 0 collision_mask = 72 continuous_cd = true @@ -181,6 +167,21 @@ autostart = true script = ExtResource("5_hp00m") _attacks = Array[PackedScene]([ExtResource("7_1t6n0"), ExtResource("6_frlsw")]) +[node name="god circuit stage 1" type="Node3D" parent="StaticBody3D"] +transform = Transform3D(-1, -7.54979e-08, 7.54979e-08, 7.54979e-08, 0, 1, -7.54979e-08, 1, 0, 0, 0, 0) + +[node name="Cube" type="MeshInstance3D" parent="StaticBody3D/god circuit stage 1"] +transform = Transform3D(-1, 7.54979e-08, -7.54979e-08, -7.54979e-08, 0, 1, 7.54979e-08, 1, 0, 0, 0, 0) +mesh = SubResource("ArrayMesh_vv6dc") +skeleton = NodePath("") + +[node name="Cube2" type="MeshInstance3D" parent="StaticBody3D/god circuit stage 1"] +transform = Transform3D(-1, 7.54979e-08, -7.54979e-08, -7.54979e-08, 0, 1, 7.54979e-08, 1, 0, 0, 0, 0) +layers = 0 +material_override = SubResource("ShaderMaterial_aqrc7") +mesh = SubResource("ArrayMesh_vv6dc") +skeleton = NodePath("") + [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] stream = ExtResource("4_kc3iq") diff --git a/Enemies/HealthPoints.cs b/Enemies/HealthPoints.cs index 7af80f0..737e783 100644 --- a/Enemies/HealthPoints.cs +++ b/Enemies/HealthPoints.cs @@ -5,7 +5,7 @@ public partial class HealthPoints : Node [Export] public long MaximumHP { get; protected set; } - public long CurrentHP { get; protected set; } + public long CurrentHP { get; set; } public override void _Ready() { diff --git a/Enemies/Scripts/GodCircuit.cs b/Enemies/Scripts/GodCircuit.cs index 7a457e9..c176103 100644 --- a/Enemies/Scripts/GodCircuit.cs +++ b/Enemies/Scripts/GodCircuit.cs @@ -22,6 +22,20 @@ public partial class GodCircuit : Node3D var hpComponent = GetNode("HP Component"); hpComponent.TakeDamage(800000); EmitSignal(SignalName.OnEnemyBossHit, hpComponent.CurrentHP); + + if (hpComponent.CurrentHP <= 0) + QueueFree(); } } + + private void OnBossOrbDestroyed() + { + var hpComponent = GetNode("HP Component"); + _animationPlayer.Play("OnHit"); + hpComponent.TakeDamage(30000000); + EmitSignal(SignalName.OnEnemyBossHit, hpComponent.CurrentHP); + + if (hpComponent.CurrentHP <= 0) + hpComponent.CurrentHP = 1; + } } diff --git a/GameLogic/Main.tscn b/GameLogic/Main.tscn index 8c6810e..f6f4717 100644 --- a/GameLogic/Main.tscn +++ b/GameLogic/Main.tscn @@ -23,7 +23,7 @@ font_color = Color(0, 1, 0, 1) [node name="Main" type="Node3D" node_paths=PackedStringArray("_fpsCounter")] script = ExtResource("1_g4hua") -Levels = Array[PackedScene]([ExtResource("6_xmedq"), ExtResource("2_jq3qe"), ExtResource("3_nhrqr"), ExtResource("5_xj47l"), ExtResource("2_0yhby"), ExtResource("7_58n7x"), ExtResource("8_pcp3p"), ExtResource("9_n1hja"), ExtResource("10_rs7ve"), ExtResource("11_o275c")]) +Levels = Array[PackedScene]([ExtResource("11_o275c"), ExtResource("6_xmedq"), ExtResource("2_jq3qe"), ExtResource("3_nhrqr"), ExtResource("5_xj47l"), ExtResource("2_0yhby"), ExtResource("7_58n7x"), ExtResource("8_pcp3p"), ExtResource("9_n1hja"), ExtResource("10_rs7ve")]) GameManager = ExtResource("11_wiyvp") _fpsCounter = NodePath("FPS Counter") diff --git a/Levels/Scenes/BossOrbs.cs b/Levels/Scenes/BossOrbs.cs new file mode 100644 index 0000000..a49397f --- /dev/null +++ b/Levels/Scenes/BossOrbs.cs @@ -0,0 +1,28 @@ +using Godot; + +public partial class BossOrbs : RigidBody3D +{ + [Signal] + public delegate void OnBossOrbExplodedEventHandler(); + + [Export] + private float _rotationSpeed = Mathf.Pi; + [Export] + private HealthPoints _hp; + + public override void _Process(double delta) + { + GetParentNode3D().Rotate(Vector3.Up, _rotationSpeed * (float)delta); + } + + public void OnOrbHit(Node3D node) + { + _hp.TakeDamage(50000); + GD.Print(_hp.CurrentHP); + if (_hp.CurrentHP <= 0) + { + EmitSignal(SignalName.OnBossOrbExploded); + QueueFree(); + } + } +} diff --git a/Levels/Scenes/Level10.tscn b/Levels/Scenes/Level10.tscn index ecf75df..4da152a 100644 --- a/Levels/Scenes/Level10.tscn +++ b/Levels/Scenes/Level10.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=16 format=3 uid="uid://0hdnmilwrsq6"] +[gd_scene load_steps=21 format=3 uid="uid://0hdnmilwrsq6"] [ext_resource type="Script" path="res://Levels/Scripts/FinalLevel.cs" id="1_sy7dk"] [ext_resource type="Script" path="res://Enemies/HealthbarProgress.cs" id="2_53ar2"] @@ -7,6 +7,10 @@ [ext_resource type="PackedScene" uid="uid://b0chkusc2bo2v" path="res://Levels/Models/Stage10/AnimatedFinal.tscn" id="6_8beqh"] [ext_resource type="AudioStream" uid="uid://cat08h84wm5gm" path="res://Audio/SFX/ominous.wav" id="7_gnuti"] [ext_resource type="PackedScene" uid="uid://b1j0g6ikmnibm" path="res://Enemies/HPComponent.tscn" id="7_nvq88"] +[ext_resource type="Texture2D" uid="uid://dd71tdgrgic46" path="res://Textures/Projectiles/LB ORB.png" id="8_2yfol"] +[ext_resource type="Script" path="res://Levels/Scenes/BossOrbs.cs" id="8_7itwt"] +[ext_resource type="Texture2D" uid="uid://uatt2w2jsoan" path="res://Textures/Projectiles/LB HEDRON.png" id="9_rv0g1"] +[ext_resource type="Texture2D" uid="uid://cqbortt0hksns" path="res://Textures/Projectiles/LB PYRAMID.png" id="10_dusre"] [sub_resource type="BoxShape3D" id="BoxShape3D_43mih"] size = Vector3(5, 20, 27.822) @@ -60,6 +64,10 @@ _data = { "RESET": SubResource("Animation_wy7s8") } +[sub_resource type="CylinderShape3D" id="CylinderShape3D_3l1g5"] +height = 3.85738 +radius = 0.511049 + [node name="Level10" type="Node3D" groups=["Level"]] process_mode = 3 script = ExtResource("1_sy7dk") @@ -67,9 +75,10 @@ script = ExtResource("1_sy7dk") [node name="FINAL STAGE" parent="." instance=ExtResource("6_8beqh")] [node name="God Circuit" parent="." instance=ExtResource("4_vmhpd")] +transform = Transform3D(1, 0, 0, 0, 0.877012, 0.480468, 0, -0.480468, 0.877012, 0, 1.29734, -1.26966) [node name="HP Component" parent="God Circuit" instance=ExtResource("7_nvq88")] -MaximumHP = 200000000 +MaximumHP = 100000000 [node name="StaticBody3D" type="StaticBody3D" parent="."] collision_mask = 0 @@ -106,7 +115,7 @@ offset_top = 39.0 offset_right = 1442.0 offset_bottom = 78.0 grow_horizontal = 2 -max_value = 2e+08 +max_value = 1e+08 nine_patch_stretch = true texture_progress = ExtResource("5_jjg8p") script = ExtResource("2_53ar2") @@ -135,4 +144,90 @@ libraries = { stream = ExtResource("7_gnuti") autoplay = true +[node name="Pivot" type="Node3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.260435, 0, -1.52945) + +[node name="Pyramid" type="RigidBody3D" parent="Pivot" node_paths=PackedStringArray("_hp")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.064761, 0.75105, -3.23007) +collision_layer = 0 +collision_mask = 69 +gravity_scale = 0.0 +continuous_cd = true +max_contacts_reported = 10 +contact_monitor = true +can_sleep = false +freeze_mode = 1 +script = ExtResource("8_7itwt") +_rotationSpeed = 0.1 +_hp = NodePath("HP Component") + +[node name="PyramidSprite" type="Sprite3D" parent="Pivot/Pyramid"] +transform = Transform3D(0.12, 0, 0, 0, 0.12, 0, 0, 0, 0.12, 0, 0, 0) +axis = 1 +texture = ExtResource("10_dusre") + +[node name="CollisionShape3D2" type="CollisionShape3D" parent="Pivot/Pyramid"] +transform = Transform3D(1, 0, -2.98023e-08, 0, 1, 0, 2.98023e-08, 0, 1, 0.0513983, 0, 0) +shape = SubResource("CylinderShape3D_3l1g5") + +[node name="HP Component" parent="Pivot/Pyramid" instance=ExtResource("7_nvq88")] +MaximumHP = 1 + +[node name="Orb" type="RigidBody3D" parent="Pivot" node_paths=PackedStringArray("_hp")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.69215, 0.241416, 1.28096) +collision_layer = 0 +collision_mask = 69 +gravity_scale = 0.0 +continuous_cd = true +max_contacts_reported = 10 +contact_monitor = true +can_sleep = false +freeze_mode = 1 +script = ExtResource("8_7itwt") +_rotationSpeed = 0.1 +_hp = NodePath("HP Component") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Pivot/Orb"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.459897, 0, 0.538185) +shape = SubResource("CylinderShape3D_3l1g5") + +[node name="OrbSprite" type="Sprite3D" parent="Pivot/Orb"] +transform = Transform3D(0.12, 0, 0, 0, 0.12, 0, 0, 0, 0.12, -0.47522, 0, 0.577053) +axis = 1 +texture = ExtResource("8_2yfol") + +[node name="HP Component" parent="Pivot/Orb" instance=ExtResource("7_nvq88")] +MaximumHP = 1 + +[node name="Hedron" type="RigidBody3D" parent="Pivot" node_paths=PackedStringArray("_hp")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.29263, 0.704458, 1.45723) +collision_layer = 0 +collision_mask = 69 +gravity_scale = 0.0 +continuous_cd = true +max_contacts_reported = 10 +contact_monitor = true +can_sleep = false +freeze_mode = 1 +script = ExtResource("8_7itwt") +_rotationSpeed = 0.1 +_hp = NodePath("HP Component") + +[node name="HedronSprite" type="Sprite3D" parent="Pivot/Hedron"] +transform = Transform3D(0.15, 0, 0, 0, 0.15, 0, 0, 0, 0.15, 0, 0, 0) +axis = 1 +texture = ExtResource("9_rv0g1") + +[node name="CollisionShape3D2" type="CollisionShape3D" parent="Pivot/Hedron"] +shape = SubResource("CylinderShape3D_3l1g5") + +[node name="HP Component" parent="Pivot/Hedron" instance=ExtResource("7_nvq88")] +MaximumHP = 1 + [connection signal="OnEnemyBossHit" from="God Circuit" to="Boss GUI/TextureProgressBar" method="UpdateBar"] +[connection signal="OnBossOrbExploded" from="Pivot/Pyramid" to="God Circuit" method="OnBossOrbDestroyed"] +[connection signal="body_entered" from="Pivot/Pyramid" to="Pivot/Pyramid" method="OnOrbHit"] +[connection signal="OnBossOrbExploded" from="Pivot/Orb" to="God Circuit" method="OnBossOrbDestroyed"] +[connection signal="body_entered" from="Pivot/Orb" to="Pivot/Orb" method="OnOrbHit"] +[connection signal="OnBossOrbExploded" from="Pivot/Hedron" to="God Circuit" method="OnBossOrbDestroyed"] +[connection signal="body_entered" from="Pivot/Hedron" to="Pivot/Hedron" method="OnOrbHit"] diff --git a/Textures/Projectiles/LB PYRAMID.png b/Textures/Projectiles/LB PYRAMID.png new file mode 100644 index 0000000..6fa5938 Binary files /dev/null and b/Textures/Projectiles/LB PYRAMID.png differ diff --git a/Textures/Projectiles/LB PYRAMID.png.import b/Textures/Projectiles/LB PYRAMID.png.import new file mode 100644 index 0000000..68de26a --- /dev/null +++ b/Textures/Projectiles/LB PYRAMID.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cqbortt0hksns" +path.s3tc="res://.godot/imported/LB PYRAMID.png-419637cb0121d4fd4da65dc1edbb3df5.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://Textures/Projectiles/LB PYRAMID.png" +dest_files=["res://.godot/imported/LB PYRAMID.png-419637cb0121d4fd4da65dc1edbb3df5.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0