all that we can do with this emotion

This commit is contained in:
2023-09-14 02:41:10 -07:00
parent f3528d897c
commit 568eb9e6e0
69 changed files with 5097 additions and 613 deletions

View File

@@ -1,26 +1,6 @@
using Godot;
using Godot.Collections;
using System.Linq;
public partial class GodCircuitAttacks : Timer
{
[Export]
public Array<PackedScene> _attacks;
private int _currentAttack = 0;
public override void _Process(double delta)
{
if (GetTree().GetFirstNodeInGroup("Player") != null)
Paused = false;
else
Paused = true;
}
public void OnTimeout()
{
_currentAttack = GD.RandRange(0, _attacks.Count - 1);
var attack = _attacks.ElementAt(_currentAttack).Instantiate();
AddChild(attack);
}
}

View File

@@ -1,47 +1,37 @@
[gd_scene load_steps=5 format=3 uid="uid://uwia12i7yykb"]
[gd_scene load_steps=4 format=3 uid="uid://uwia12i7yykb"]
[ext_resource type="Script" path="res://Player/Base/Projectile.cs" id="1_4wsx3"]
[ext_resource type="Texture2D" uid="uid://blhihtd4vmbrg" path="res://Textures/Projectiles/Layer 7.png" id="1_odish"]
[ext_resource type="Texture2D" uid="uid://bunon01jmxhbx" path="res://Textures/Projectiles/Layer 2.png" id="1_a70u8"]
[sub_resource type="Curve3D" id="Curve3D_5bny4"]
[sub_resource type="Curve3D" id="Curve3D_n05rs"]
_data = {
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, -8),
"tilts": PackedFloat32Array(0, 0)
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, -2, 1, 2, 0, 0, 0, 0, 0, 0, -2, 1, 4, 0, 0, 0, 0, 0, 0, 2, 1, 4, 0, 0, 0, 0, 0, 0, 2, 1, 6),
"tilts": PackedFloat32Array(0, 0, 0, 0, 0, 0)
}
point_count = 2
point_count = 6
[sub_resource type="BoxShape3D" id="BoxShape3D_54g6d"]
size = Vector3(1, 4.3194, 1.42031)
[sub_resource type="BoxShape3D" id="BoxShape3D_g5fdd"]
size = Vector3(0.553759, 1.22067, 1.58866)
[node name="Laser Attack" type="Path3D"]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -3, 0, 1.5)
curve = SubResource("Curve3D_5bny4")
script = ExtResource("1_4wsx3")
_projectileSpeed = 3.0
[node name="Path3D" type="Path3D"]
curve = SubResource("Curve3D_n05rs")
[node name="PathFollow3D" type="PathFollow3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
rotation_mode = 0
loop = false
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1, 0)
[node name="RigidBody3D" type="RigidBody3D" parent="PathFollow3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.944978)
collision_layer = 0
collision_mask = 2
gravity_scale = 0.0
continuous_cd = true
max_contacts_reported = 5
contact_monitor = true
can_sleep = false
freeze = true
freeze_mode = 1
[node name="CollisionShape3D" type="CollisionShape3D" parent="PathFollow3D/RigidBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.38419e-07, 0, 1.78244)
shape = SubResource("BoxShape3D_54g6d")
shape = SubResource("BoxShape3D_g5fdd")
[node name="Sprite3D" type="Sprite3D" parent="PathFollow3D/RigidBody3D/CollisionShape3D"]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
transform = Transform3D(-2.18557e-08, 0, 0.5, 0, 0.5, 0, -0.5, 0, -2.18557e-08, 0, 0, 0)
axis = 1
texture = ExtResource("1_odish")
[connection signal="body_entered" from="PathFollow3D/RigidBody3D" to="." method="OnPlayerHit"]
texture = ExtResource("1_a70u8")

View File

@@ -0,0 +1,29 @@
using Godot;
public partial class PyramidAttack : Node3D
{
[Export]
private AnimationPlayer _animationPlayer;
public override void _Ready()
{
_animationPlayer.AnimationFinished += Delete;
}
public void OnPlayerHit(Node node)
{
SetPhysicsProcess(false);
if (node is Character character && character.HasMethod(Character.MethodName.OnHit))
{
GD.Print("Player hit: " + character.Name);
character.Call(Character.MethodName.OnHit, this);
}
QueueFree();
}
public void Delete(StringName name)
{
QueueFree();
}
}

View File

@@ -1,13 +1,74 @@
[gd_scene load_steps=18 format=3 uid="uid://brbshysbgd47q"]
[gd_scene load_steps=15 format=3 uid="uid://brbshysbgd47q"]
[ext_resource type="Script" path="res://Enemies/Scripts/GodCircuit.cs" id="1_gyfww"]
[ext_resource type="Texture2D" uid="uid://b41ur7kyd8vdl" path="res://Levels/Models/Stage10/god circuit stage 1_image.png" id="2_2fhjk"]
[ext_resource type="Shader" path="res://Levels/Scenes/Door.gdshader" id="3_05w5o"]
[ext_resource type="AudioStream" uid="uid://cat08h84wm5gm" path="res://Audio/SFX/ominous.wav" id="3_yengs"]
[ext_resource type="AudioStream" uid="uid://crto2nljfvqnm" path="res://Audio/SFX/midboss hurt.wav" id="4_kc3iq"]
[ext_resource type="Script" path="res://Enemies/Attacks/GodCircuitAttacks/GodCircuitAttacks.cs" id="5_hp00m"]
[ext_resource type="PackedScene" uid="uid://uwia12i7yykb" path="res://Enemies/Attacks/GodCircuitAttacks/LaserAttack.tscn" id="6_frlsw"]
[ext_resource type="PackedScene" uid="uid://cerac64r5jewa" path="res://Enemies/Attacks/GodCircuitAttacks/OrbAttack.tscn" id="7_1t6n0"]
[sub_resource type="Animation" id="Animation_qiplh"]
resource_name = "OnDeath"
length = 6.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("StaticBody3D/god circuit stage 1/Cube:layers")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [1, 0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("StaticBody3D/god circuit stage 1/Cube2:layers")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.1),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [0, 1]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("AudioStreamPlayer:playing")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("AudioStreamPlayer:stream")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("3_yengs")]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("StaticBody3D/god circuit stage 1/Cube2:transparency")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0.1, 6.5),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.0, 1.0]
}
[sub_resource type="Animation" id="Animation_n85p2"]
resource_name = "OnHit"
@@ -124,70 +185,6 @@ tracks/4/keys = {
"values": [0.0]
}
[sub_resource type="Animation" id="Animation_qiplh"]
resource_name = "OnDeath"
length = 6.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("StaticBody3D/god circuit stage 1/Cube:layers")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [1, 0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("StaticBody3D/god circuit stage 1/Cube2:layers")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.1),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [0, 1]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("AudioStreamPlayer:playing")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("AudioStreamPlayer:stream")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("3_yengs")]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("StaticBody3D/god circuit stage 1/Cube2:transparency")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0.1, 6.5),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.0, 1.0]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_qiwcq"]
_data = {
"OnDeath": SubResource("Animation_qiplh"),
@@ -242,7 +239,7 @@ shader = ExtResource("3_05w5o")
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")
_attackTimer = NodePath("StaticBody3D/Timer")
_attackTimer = NodePath("")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
@@ -264,12 +261,6 @@ freeze_mode = 1
transform = Transform3D(1, 0, 0, 0, 1, 0, 4.30333e-22, 0, 1, 0.317906, -0.678684, 1.59406)
shape = SubResource("BoxShape3D_n2erm")
[node name="Timer" type="Timer" parent="StaticBody3D"]
wait_time = 5.0
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)
@@ -289,4 +280,3 @@ skeleton = NodePath("")
stream = ExtResource("3_yengs")
[connection signal="body_entered" from="StaticBody3D" to="." method="OnHit"]
[connection signal="timeout" from="StaticBody3D/Timer" to="StaticBody3D/Timer" method="OnTimeout"]

View File

@@ -1255,7 +1255,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00804788, 1.02138, -0.02382
shape = SubResource("BoxShape3D_1nq5h")
[node name="HP Component" parent="." instance=ExtResource("2_1leby")]
MaximumHP = 1
MaximumHP = 2
[node name="Area3D" type="Area3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00804788, 1.01495, 0.00193942)
@@ -1265,5 +1265,5 @@ collision_mask = 68
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
shape = SubResource("BoxShape3D_lqe1n")
[connection signal="body_entered" from="Area3D" to="." method="OnEnemyHit"]
[connection signal="body_entered" from="Area3D" to="." method="OnPlayerHit"]
[connection signal="body_entered" from="Area3D" to="." method="OnEnemyHit"]

View File

@@ -1064,7 +1064,7 @@ mesh = SubResource("ArrayMesh_lu7e3")
skeleton = NodePath("")
[node name="HP Component" parent="." instance=ExtResource("4_1vt55")]
MaximumHP = 1
MaximumHP = 2
[connection signal="body_entered" from="." to="." method="OnPlayerHit"]
[connection signal="timeout" from="Timer" to="Timer" method="OnFireAtPlayer"]

View File

@@ -35,7 +35,6 @@ public partial class GodCircuit : Node3D
if (hpComponent.CurrentHP <= 0)
{
_attackTimer.Stop();
EmitSignal(SignalName.DestroyRemainingOrbs);
_animationPlayer.Play("OnDeath");
_animationPlayer.AnimationFinished += OnGameFinished;