Boss orbs
This commit is contained in:
28
Levels/Scenes/BossOrbs.cs
Normal file
28
Levels/Scenes/BossOrbs.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user