Boss orbs

This commit is contained in:
2023-09-12 11:58:58 -07:00
parent 37180e2def
commit 7599d3a665
8 changed files with 201 additions and 28 deletions

View File

@@ -14,7 +14,7 @@ length = 0.5
tracks/0/type = "value" tracks/0/type = "value"
tracks/0/imported = false tracks/0/imported = false
tracks/0/enabled = true 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/interp = 1
tracks/0/loop_wrap = true tracks/0/loop_wrap = true
tracks/0/keys = { tracks/0/keys = {
@@ -26,7 +26,7 @@ tracks/0/keys = {
tracks/1/type = "value" tracks/1/type = "value"
tracks/1/imported = false tracks/1/imported = false
tracks/1/enabled = true 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/interp = 1
tracks/1/loop_wrap = true tracks/1/loop_wrap = true
tracks/1/keys = { tracks/1/keys = {
@@ -53,7 +53,7 @@ length = 0.001
tracks/0/type = "value" tracks/0/type = "value"
tracks/0/imported = false tracks/0/imported = false
tracks/0/enabled = true 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/interp = 1
tracks/0/loop_wrap = true tracks/0/loop_wrap = true
tracks/0/keys = { tracks/0/keys = {
@@ -65,7 +65,7 @@ tracks/0/keys = {
tracks/1/type = "value" tracks/1/type = "value"
tracks/1/imported = false tracks/1/imported = false
tracks/1/enabled = true 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/interp = 1
tracks/1/loop_wrap = true tracks/1/loop_wrap = true
tracks/1/keys = { tracks/1/keys = {
@@ -93,6 +93,9 @@ _data = {
"RESET": SubResource("Animation_47f75") "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"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_7b0kx"]
resource_name = "Material.001" resource_name = "Material.001"
cull_mode = 2 cull_mode = 2
@@ -133,11 +136,8 @@ shadow_mesh = SubResource("ArrayMesh_f3cka")
render_priority = 0 render_priority = 0
shader = ExtResource("3_05w5o") 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")] [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") script = ExtResource("1_gyfww")
_animationPlayer = NodePath("AnimationPlayer") _animationPlayer = NodePath("AnimationPlayer")
@@ -146,22 +146,8 @@ libraries = {
"": SubResource("AnimationLibrary_qiwcq") "": 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="."] [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_layer = 0
collision_mask = 72 collision_mask = 72
continuous_cd = true continuous_cd = true
@@ -181,6 +167,21 @@ autostart = true
script = ExtResource("5_hp00m") script = ExtResource("5_hp00m")
_attacks = Array[PackedScene]([ExtResource("7_1t6n0"), ExtResource("6_frlsw")]) _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="."] [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("4_kc3iq") stream = ExtResource("4_kc3iq")

View File

@@ -5,7 +5,7 @@ public partial class HealthPoints : Node
[Export] [Export]
public long MaximumHP { get; protected set; } public long MaximumHP { get; protected set; }
public long CurrentHP { get; protected set; } public long CurrentHP { get; set; }
public override void _Ready() public override void _Ready()
{ {

View File

@@ -22,6 +22,20 @@ public partial class GodCircuit : Node3D
var hpComponent = GetNode<HealthPoints>("HP Component"); var hpComponent = GetNode<HealthPoints>("HP Component");
hpComponent.TakeDamage(800000); hpComponent.TakeDamage(800000);
EmitSignal(SignalName.OnEnemyBossHit, hpComponent.CurrentHP); EmitSignal(SignalName.OnEnemyBossHit, hpComponent.CurrentHP);
if (hpComponent.CurrentHP <= 0)
QueueFree();
} }
} }
private void OnBossOrbDestroyed()
{
var hpComponent = GetNode<HealthPoints>("HP Component");
_animationPlayer.Play("OnHit");
hpComponent.TakeDamage(30000000);
EmitSignal(SignalName.OnEnemyBossHit, hpComponent.CurrentHP);
if (hpComponent.CurrentHP <= 0)
hpComponent.CurrentHP = 1;
}
} }

View File

@@ -23,7 +23,7 @@ font_color = Color(0, 1, 0, 1)
[node name="Main" type="Node3D" node_paths=PackedStringArray("_fpsCounter")] [node name="Main" type="Node3D" node_paths=PackedStringArray("_fpsCounter")]
script = ExtResource("1_g4hua") 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") GameManager = ExtResource("11_wiyvp")
_fpsCounter = NodePath("FPS Counter") _fpsCounter = NodePath("FPS Counter")

28
Levels/Scenes/BossOrbs.cs Normal file
View File

@@ -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();
}
}
}

View File

@@ -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://Levels/Scripts/FinalLevel.cs" id="1_sy7dk"]
[ext_resource type="Script" path="res://Enemies/HealthbarProgress.cs" id="2_53ar2"] [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="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="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="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"] [sub_resource type="BoxShape3D" id="BoxShape3D_43mih"]
size = Vector3(5, 20, 27.822) size = Vector3(5, 20, 27.822)
@@ -60,6 +64,10 @@ _data = {
"RESET": SubResource("Animation_wy7s8") "RESET": SubResource("Animation_wy7s8")
} }
[sub_resource type="CylinderShape3D" id="CylinderShape3D_3l1g5"]
height = 3.85738
radius = 0.511049
[node name="Level10" type="Node3D" groups=["Level"]] [node name="Level10" type="Node3D" groups=["Level"]]
process_mode = 3 process_mode = 3
script = ExtResource("1_sy7dk") script = ExtResource("1_sy7dk")
@@ -67,9 +75,10 @@ script = ExtResource("1_sy7dk")
[node name="FINAL STAGE" parent="." instance=ExtResource("6_8beqh")] [node name="FINAL STAGE" parent="." instance=ExtResource("6_8beqh")]
[node name="God Circuit" parent="." instance=ExtResource("4_vmhpd")] [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")] [node name="HP Component" parent="God Circuit" instance=ExtResource("7_nvq88")]
MaximumHP = 200000000 MaximumHP = 100000000
[node name="StaticBody3D" type="StaticBody3D" parent="."] [node name="StaticBody3D" type="StaticBody3D" parent="."]
collision_mask = 0 collision_mask = 0
@@ -106,7 +115,7 @@ offset_top = 39.0
offset_right = 1442.0 offset_right = 1442.0
offset_bottom = 78.0 offset_bottom = 78.0
grow_horizontal = 2 grow_horizontal = 2
max_value = 2e+08 max_value = 1e+08
nine_patch_stretch = true nine_patch_stretch = true
texture_progress = ExtResource("5_jjg8p") texture_progress = ExtResource("5_jjg8p")
script = ExtResource("2_53ar2") script = ExtResource("2_53ar2")
@@ -135,4 +144,90 @@ libraries = {
stream = ExtResource("7_gnuti") stream = ExtResource("7_gnuti")
autoplay = true 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="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"]

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -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