Boss hit animation

This commit is contained in:
2023-09-08 01:34:37 -07:00
parent 5362240120
commit 929629a826
10 changed files with 169 additions and 31 deletions

View File

@@ -3,12 +3,12 @@
importer="wav"
type="AudioStreamWAV"
uid="uid://cdps3mfvdxdud"
path="res://.godot/imported/select.wav-2635c7b58e339437700447f3d280ad9e.sample"
path="res://.godot/imported/Select.wav-7133743fa12346242cba11b6ff8e2589.sample"
[deps]
source_file="res://Audio/SFX/select.wav"
dest_files=["res://.godot/imported/select.wav-2635c7b58e339437700447f3d280ad9e.sample"]
source_file="res://Audio/SFX/Select.wav"
dest_files=["res://.godot/imported/Select.wav-7133743fa12346242cba11b6ff8e2589.sample"]
[params]

View File

@@ -1,30 +1,148 @@
[gd_scene load_steps=4 format=3 uid="uid://brbshysbgd47q"]
[gd_scene load_steps=12 format=3 uid="uid://brbshysbgd47q"]
[ext_resource type="Script" path="res://Enemies/Scripts/GodCircuit.cs" id="1_gyfww"]
[ext_resource type="PackedScene" uid="uid://cigdj84f0m3jd" path="res://Levels/Models/Stage10/god circuit stage 1.glb" id="1_w12q0"]
[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"]
[sub_resource type="BoxShape3D" id="BoxShape3D_l1qm4"]
size = Vector3(2.64724, 5.07315, 0.653787)
[sub_resource type="Animation" id="Animation_n85p2"]
resource_name = "OnHit"
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/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.3),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [1, 0, 1]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("god circuit stage 1/Cube2:layers")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.1, 0.3),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [0, 1, 0]
}
[node name="God Circuit" type="Node3D"]
[sub_resource type="Animation" id="Animation_47f75"]
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/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [1]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("god circuit stage 1/Cube2:layers")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_qiwcq"]
_data = {
"OnHit": SubResource("Animation_n85p2"),
"RESET": SubResource("Animation_47f75")
}
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_7b0kx"]
resource_name = "Material.001"
cull_mode = 2
vertex_color_use_as_albedo = true
albedo_texture = ExtResource("2_2fhjk")
[sub_resource type="ArrayMesh" id="ArrayMesh_f3cka"]
_surfaces = [{
"aabb": AABB(-1, -1, -1, 2.66138, 0.649563, 5.00824),
"format": 4097,
"index_count": 36,
"index_data": PackedByteArray(0, 0, 3, 0, 1, 0, 0, 0, 2, 0, 3, 0, 2, 0, 7, 0, 3, 0, 2, 0, 6, 0, 7, 0, 6, 0, 5, 0, 7, 0, 6, 0, 4, 0, 5, 0, 4, 0, 1, 0, 5, 0, 4, 0, 0, 0, 1, 0, 2, 0, 4, 0, 6, 0, 2, 0, 0, 0, 4, 0, 7, 0, 1, 0, 3, 0, 7, 0, 5, 0, 1, 0),
"name": "Material.001",
"primitive": 3,
"vertex_count": 8,
"vertex_data": PackedByteArray(0, 0, 128, 191, 0, 0, 128, 191, 108, 67, 128, 64, 0, 0, 128, 191, 108, 108, 179, 190, 108, 67, 128, 64, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 128, 191, 108, 108, 179, 190, 0, 0, 128, 191, 59, 168, 212, 63, 0, 0, 128, 191, 108, 67, 128, 64, 59, 168, 212, 63, 108, 108, 179, 190, 108, 67, 128, 64, 59, 168, 212, 63, 0, 0, 128, 191, 0, 0, 128, 191, 59, 168, 212, 63, 108, 108, 179, 190, 0, 0, 128, 191)
}]
blend_shape_mode = 0
[sub_resource type="ArrayMesh" id="ArrayMesh_vv6dc"]
resource_name = "god circuit stage 1_Cube_001"
_surfaces = [{
"aabb": AABB(-1, -1, -1, 2.66138, 0.649563, 5.00824),
"attribute_data": PackedByteArray(0, 124, 90, 63, 49, 24, 1, 63, 0, 0, 0, 62, 0, 0, 128, 62, 72, 98, 91, 63, 194, 196, 208, 62, 207, 12, 103, 63, 49, 24, 1, 63, 170, 9, 117, 63, 194, 196, 208, 62, 63, 130, 124, 63, 128, 33, 235, 59, 0, 124, 90, 63, 196, 14, 233, 62, 0, 0, 0, 62, 0, 0, 0, 63, 86, 189, 87, 63, 192, 129, 255, 62, 207, 12, 103, 63, 196, 14, 233, 62, 120, 203, 105, 63, 192, 129, 255, 62, 52, 130, 124, 63, 189, 41, 126, 63, 0, 0, 192, 62, 0, 0, 128, 62, 72, 98, 91, 63, 196, 9, 2, 63, 152, 41, 82, 63, 206, 91, 210, 62, 170, 9, 117, 63, 196, 9, 2, 63, 32, 56, 40, 60, 128, 33, 235, 59, 212, 104, 106, 63, 206, 91, 210, 62, 0, 0, 192, 62, 0, 0, 0, 63, 86, 189, 87, 63, 122, 101, 219, 62, 152, 41, 82, 63, 34, 109, 1, 63, 120, 203, 105, 63, 122, 101, 219, 62, 64, 54, 40, 60, 189, 41, 126, 63, 212, 104, 106, 63, 34, 109, 1, 63),
"format": 4119,
"index_count": 36,
"index_data": PackedByteArray(0, 0, 9, 0, 3, 0, 0, 0, 6, 0, 9, 0, 8, 0, 21, 0, 10, 0, 8, 0, 19, 0, 21, 0, 20, 0, 17, 0, 23, 0, 20, 0, 14, 0, 17, 0, 13, 0, 4, 0, 15, 0, 13, 0, 2, 0, 4, 0, 7, 0, 12, 0, 18, 0, 7, 0, 1, 0, 12, 0, 22, 0, 5, 0, 11, 0, 22, 0, 16, 0, 5, 0),
"material": SubResource("StandardMaterial3D_7b0kx"),
"name": "Material.001",
"primitive": 3,
"vertex_count": 24,
"vertex_data": PackedByteArray(0, 0, 128, 191, 0, 0, 128, 191, 108, 67, 128, 64, 0, 0, 255, 127, 255, 127, 255, 255, 0, 0, 128, 191, 0, 0, 128, 191, 108, 67, 128, 64, 255, 127, 0, 0, 255, 255, 255, 191, 0, 0, 128, 191, 0, 0, 128, 191, 108, 67, 128, 64, 255, 127, 255, 127, 255, 127, 255, 255, 0, 0, 128, 191, 108, 108, 179, 190, 108, 67, 128, 64, 0, 0, 255, 127, 255, 127, 255, 255, 0, 0, 128, 191, 108, 108, 179, 190, 108, 67, 128, 64, 255, 127, 255, 127, 255, 127, 255, 255, 0, 0, 128, 191, 108, 108, 179, 190, 108, 67, 128, 64, 255, 127, 255, 255, 0, 0, 255, 191, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 255, 127, 255, 127, 255, 255, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 128, 191, 255, 127, 0, 0, 255, 255, 255, 191, 0, 0, 128, 191, 0, 0, 128, 191, 0, 0, 128, 191, 255, 255, 255, 255, 255, 127, 255, 255, 0, 0, 128, 191, 108, 108, 179, 190, 0, 0, 128, 191, 0, 0, 255, 127, 255, 127, 255, 255, 0, 0, 128, 191, 108, 108, 179, 190, 0, 0, 128, 191, 255, 255, 255, 255, 255, 127, 255, 255, 0, 0, 128, 191, 108, 108, 179, 190, 0, 0, 128, 191, 255, 127, 255, 255, 0, 0, 255, 191, 59, 168, 212, 63, 0, 0, 128, 191, 108, 67, 128, 64, 255, 127, 0, 0, 255, 255, 255, 191, 59, 168, 212, 63, 0, 0, 128, 191, 108, 67, 128, 64, 255, 127, 255, 127, 255, 127, 255, 255, 59, 168, 212, 63, 0, 0, 128, 191, 108, 67, 128, 64, 255, 255, 255, 127, 255, 127, 255, 255, 59, 168, 212, 63, 108, 108, 179, 190, 108, 67, 128, 64, 255, 127, 255, 127, 255, 127, 255, 255, 59, 168, 212, 63, 108, 108, 179, 190, 108, 67, 128, 64, 255, 127, 255, 255, 0, 0, 255, 191, 59, 168, 212, 63, 108, 108, 179, 190, 108, 67, 128, 64, 255, 255, 255, 127, 255, 127, 255, 255, 59, 168, 212, 63, 0, 0, 128, 191, 0, 0, 128, 191, 255, 127, 0, 0, 255, 255, 255, 191, 59, 168, 212, 63, 0, 0, 128, 191, 0, 0, 128, 191, 255, 255, 255, 255, 255, 127, 255, 255, 59, 168, 212, 63, 0, 0, 128, 191, 0, 0, 128, 191, 255, 255, 255, 127, 255, 127, 255, 255, 59, 168, 212, 63, 108, 108, 179, 190, 0, 0, 128, 191, 255, 255, 255, 255, 255, 127, 255, 255, 59, 168, 212, 63, 108, 108, 179, 190, 0, 0, 128, 191, 255, 127, 255, 255, 0, 0, 255, 191, 59, 168, 212, 63, 108, 108, 179, 190, 0, 0, 128, 191, 255, 255, 255, 127, 255, 127, 255, 255)
}]
blend_shape_mode = 0
shadow_mesh = SubResource("ArrayMesh_f3cka")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_aqrc7"]
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)
script = ExtResource("1_gyfww")
_animationPlayer = NodePath("AnimationPlayer")
[node name="god circuit stage 1" parent="." instance=ExtResource("1_w12q0")]
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_qiwcq")
}
[node name="Area3D" type="Area3D" parent="god circuit stage 1"]
[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)
collision_layer = 0
collision_mask = 2
collision_mask = 4
continuous_cd = true
max_contacts_reported = 1
contact_monitor = true
can_sleep = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="god circuit stage 1/Area3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.93109, 1.49955, -2.35288)
shape = SubResource("BoxShape3D_l1qm4")
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D"]
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="StaticBody3D" type="StaticBody3D" parent="god circuit stage 1"]
collision_layer = 4096
collision_mask = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="god circuit stage 1/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.93109, 1.49955, -2.35288)
shape = SubResource("BoxShape3D_l1qm4")
[connection signal="body_entered" from="god circuit stage 1/Area3D" to="." method="OnHit"]
[connection signal="body_entered" from="StaticBody3D" to="." method="OnHit"]

View File

@@ -0,0 +1,3 @@
[gd_resource type="ShaderMaterial" format=3 uid="uid://d2081rstlyl4w"]
[resource]

View File

@@ -2,9 +2,13 @@ using Godot;
public partial class GodCircuit : Node3D
{
[Export]
private AnimationPlayer _animationPlayer;
private void OnHit(Node3D node)
{
GD.Print("Hit");
_animationPlayer.Play("OnHit");
var hpComponent = GetNode<HealthPoints>("HP Component");
hpComponent.TakeDamage(800000);
hpComponent.UpdateHealthbar();

View File

@@ -2,12 +2,12 @@
[ext_resource type="Script" path="res://GameLogic/Main.cs" id="1_g4hua"]
[ext_resource type="PackedScene" uid="uid://b12gq4yqc3d8i" path="res://UI/MainMenu.tscn" id="2_kvovw"]
[ext_resource type="PackedScene" uid="uid://btl5fdyjewnwc" path="res://Levels/Scenes/Level3.tscn" id="4_bs7wi"]
[ext_resource type="PackedScene" uid="uid://0hdnmilwrsq6" path="res://Levels/Scenes/Level10.tscn" id="2_tfrgb"]
[ext_resource type="PackedScene" uid="uid://cxj6yeddshy16" path="res://GameLogic/GameManager.tscn" id="11_wiyvp"]
[node name="Main" type="Node3D"]
script = ExtResource("1_g4hua")
Levels = Array[PackedScene]([ExtResource("4_bs7wi")])
Levels = Array[PackedScene]([ExtResource("2_tfrgb")])
GameManager = ExtResource("11_wiyvp")
[node name="MainMenu" parent="." instance=ExtResource("2_kvovw")]

View File

@@ -1,8 +1,9 @@
shader_type spatial;
uniform vec3 albedo : source_color;
varying float setAlpha;
void fragment() {
ALBEDO = albedo;
ALPHA = setAlpha;
void vertex(){
VERTEX.y += sin(TIME * 5.0 * VERTEX.x * 8.0) * 0.2;
}
void fragment() {
ALBEDO = vec3(1, 0, 0);
}

View File

@@ -35,7 +35,7 @@ loop = false
tilt_enabled = false
[node name="Hitbox" type="RigidBody3D" parent="Center Shot/PathFollow3D"]
collision_layer = 0
collision_layer = 4
collision_mask = 0
gravity_scale = 0.0
continuous_cd = true

View File

10
Player/Pisces/Pisces.tres Normal file
View File

@@ -0,0 +1,10 @@
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://oumrfd17ec03"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_kfsqs"]
[resource]
resource_name = "Material.005"
next_pass = SubResource("ShaderMaterial_kfsqs")
cull_mode = 2
vertex_color_use_as_albedo = true
albedo_color = Color(0.534363, 0.329744, 0.899993, 1)

View File

@@ -124,6 +124,8 @@ p2_altfire={
3d_physics/layer_1="LevelGeometry"
3d_physics/layer_2="EnemyProjectile"
3d_physics/layer_3="BossHit"
3d_physics/layer_9="ProjectileToWalls"
[physics]