Fix up projectiles

This commit is contained in:
2026-02-24 12:28:01 -08:00
parent 846c8a4c59
commit 9d18bbb349
23 changed files with 261 additions and 210 deletions

View File

@@ -1,14 +1,14 @@
[gd_scene load_steps=118 format=3 uid="uid://cnhoya51br05n"]
[ext_resource type="Script" uid="uid://cqm6u7qa8japr" path="res://src/system/Projectile.cs" id="1_81fka"]
[ext_resource type="Script" uid="uid://bbvi33wy7w7d5" path="res://src/system/EnemyProjectile.cs" id="1_lfvya"]
[ext_resource type="Script" uid="uid://ctshiyffvt4y5" path="res://src/system/AttackDataResource.cs" id="2_6m87k"]
[ext_resource type="Texture2D" uid="uid://dvjqokin1o1ic" path="res://src/vfx/Enemy/green_orbs.png" id="3_uopp7"]
[ext_resource type="AudioStream" uid="uid://c0jveij17p14k" path="res://src/audio/sfx/ENEMY_EDEN_PILLAR_PROJECTILETRAVEL.ogg" id="4_n84oq"]
[sub_resource type="Resource" id="Resource_mno7m"]
[sub_resource type="Resource" id="Resource_ka3x7"]
script = ExtResource("2_6m87k")
Damage = 7
ElementType = 4
Damage = 10
ElementType = 1
metadata/_custom_type_script = "uid://ctshiyffvt4y5"
[sub_resource type="AtlasTexture" id="AtlasTexture_fwra5"]
@@ -782,7 +782,7 @@ tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector3(0, 1, 0), Vector3(0, 1, 10)]
"values": [Vector3(0, 0, 0), Vector3(0, 0, 10)]
}
tracks/1/type = "audio"
tracks/1/imported = false
@@ -806,10 +806,10 @@ tracks/2/path = NodePath(".:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"times": PackedFloat32Array(0, 0.0666667, 1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [false, false]
"values": [false, true, false]
}
[sub_resource type="Animation" id="Animation_8qeb2"]
@@ -824,7 +824,7 @@ tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 1, 0)]
"values": [Vector3(0, 0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
@@ -846,11 +846,10 @@ _data = {
}
[node name="Projectile1" type="Node3D"]
script = ExtResource("1_81fka")
AttackData = SubResource("Resource_mno7m")
script = ExtResource("1_lfvya")
AttackData = SubResource("Resource_ka3x7")
[node name="Bullet" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
[node name="AnimatedSprite3D" type="AnimatedSprite3D" parent="Bullet"]
unique_name_in_owner = true

View File

@@ -10,8 +10,8 @@
[ext_resource type="AudioStream" uid="uid://bf7adfdd857hw" path="res://src/audio/sfx/enemy_morph.ogg" id="8_jvw36"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_cwfph"]
radius = 1.08524
height = 2.21643
radius = 1.6
height = 3.2
[sub_resource type="CylinderShape3D" id="CylinderShape3D_jbgmx"]
height = 5.0
@@ -33,12 +33,12 @@ script = ExtResource("1_e2477")
[node name="CollisionShape" type="CollisionShape3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 2.83179, 0)
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 2.2559, 0)
shape = SubResource("CapsuleShape3D_cwfph")
[node name="LineOfSight" type="Area3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 2.83179, 0)
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 2.2559, 0)
collision_layer = 2
collision_mask = 2
@@ -53,7 +53,7 @@ target_position = Vector3(0, 0, -5)
collision_mask = 3
[node name="Collision" type="Area3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.83179, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.2559, 0)
collision_layer = 2048
collision_mask = 0
@@ -66,7 +66,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.0147337, 0)
[node name="PlayerDetector" type="Area3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.83179, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.2559, 0)
collision_layer = 0
collision_mask = 34
@@ -74,7 +74,7 @@ collision_mask = 34
shape = SubResource("CylinderShape3D_tbkej")
[node name="Components" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.83179, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.2559, 0)
[node name="PatrolBehavior" parent="Components" instance=ExtResource("4_dxxe5")]
unique_name_in_owner = true
@@ -93,7 +93,7 @@ avoidance_enabled = true
radius = 2.0
[node name="HitSounds" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.83179, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.2559, 0)
[node name="AbsorbSFX" type="AudioStreamPlayer3D" parent="HitSounds"]
unique_name_in_owner = true

View File

@@ -24,11 +24,11 @@ public partial class EdenPillar : Enemy3D, IHasPrimaryAttack, IHasSecondaryAttac
[Export] public double TertiaryAttackElementalDamageBonus { get; set; } = 1.15f;
[Node] private Projectile Projectile1 { get; set; }
[Node] private EnemyProjectile Projectile1 { get; set; }
[Node] private Projectile Projectile2 { get; set; }
[Node] private EnemyProjectile Projectile2 { get; set; }
[Node] private Projectile Projectile3 { get; set; }
[Node] private EnemyProjectile Projectile3 { get; set; }
[Node] private Node3D _rotation { get; set; } = default!;

View File

@@ -1,16 +1,9 @@
[gd_scene load_steps=31 format=3 uid="uid://68xlg6uoenik"]
[gd_scene load_steps=29 format=3 uid="uid://68xlg6uoenik"]
[ext_resource type="Script" uid="uid://cqm6u7qa8japr" path="res://src/system/Projectile.cs" id="1_120b0"]
[ext_resource type="Script" uid="uid://ctshiyffvt4y5" path="res://src/system/AttackDataResource.cs" id="2_120b0"]
[ext_resource type="Script" uid="uid://bbvi33wy7w7d5" path="res://src/system/EnemyProjectile.cs" id="1_lhing"]
[ext_resource type="Texture2D" uid="uid://bc2kcbo8hvpjo" path="res://src/vfx/Enemy/EDEN_FIREBALL.png" id="2_yk5wk"]
[ext_resource type="AudioStream" uid="uid://c0jveij17p14k" path="res://src/audio/sfx/ENEMY_EDEN_PILLAR_PROJECTILETRAVEL.ogg" id="3_c2pmi"]
[sub_resource type="Resource" id="Resource_yk5wk"]
script = ExtResource("2_120b0")
Damage = 10
ElementType = 4
metadata/_custom_type_script = "uid://ctshiyffvt4y5"
[sub_resource type="AtlasTexture" id="AtlasTexture_tahr6"]
atlas = ExtResource("2_yk5wk")
region = Rect2(1024, 0, 512, 502)
@@ -263,8 +256,7 @@ _data = {
}
[node name="Projectile1" type="Node3D"]
script = ExtResource("1_120b0")
AttackData = SubResource("Resource_yk5wk")
script = ExtResource("1_lhing")
[node name="Bullet" type="Node3D" parent="."]

View File

@@ -1,16 +1,9 @@
[gd_scene load_steps=82 format=3 uid="uid://d1co3mi3bf8yj"]
[gd_scene load_steps=80 format=3 uid="uid://d1co3mi3bf8yj"]
[ext_resource type="Script" uid="uid://cqm6u7qa8japr" path="res://src/system/Projectile.cs" id="1_4lakg"]
[ext_resource type="Script" uid="uid://ctshiyffvt4y5" path="res://src/system/AttackDataResource.cs" id="2_4lakg"]
[ext_resource type="Script" uid="uid://bbvi33wy7w7d5" path="res://src/system/EnemyProjectile.cs" id="1_p235i"]
[ext_resource type="Texture2D" uid="uid://f21bov0pvu84" path="res://src/vfx/Enemy/watersheet.png" id="2_umubt"]
[ext_resource type="AudioStream" uid="uid://c0jveij17p14k" path="res://src/audio/sfx/ENEMY_EDEN_PILLAR_PROJECTILETRAVEL.ogg" id="3_2jyax"]
[sub_resource type="Resource" id="Resource_umubt"]
script = ExtResource("2_4lakg")
Damage = 10
ElementType = 3
metadata/_custom_type_script = "uid://ctshiyffvt4y5"
[sub_resource type="AtlasTexture" id="AtlasTexture_nc31c"]
atlas = ExtResource("2_umubt")
region = Rect2(414, 0, 414, 407)
@@ -621,8 +614,7 @@ _data = {
[node name="Projectile2" type="Node3D"]
transform = Transform3D(-0.529919, 0, 0.848048, 0, 1, 0, -0.848048, 0, -0.529919, 0, 0, 0)
script = ExtResource("1_4lakg")
AttackData = SubResource("Resource_umubt")
script = ExtResource("1_p235i")
[node name="Bullet" type="Node3D" parent="."]

View File

@@ -1,16 +1,9 @@
[gd_scene load_steps=130 format=3 uid="uid://coif30gd0sh8q"]
[gd_scene load_steps=128 format=3 uid="uid://coif30gd0sh8q"]
[ext_resource type="Script" uid="uid://cqm6u7qa8japr" path="res://src/system/Projectile.cs" id="1_c6b2i"]
[ext_resource type="Script" uid="uid://ctshiyffvt4y5" path="res://src/system/AttackDataResource.cs" id="2_c6b2i"]
[ext_resource type="Script" uid="uid://bbvi33wy7w7d5" path="res://src/system/EnemyProjectile.cs" id="1_i8gam"]
[ext_resource type="Texture2D" uid="uid://w5055g8ecnea" path="res://src/vfx/Enemy/EDEN_AERO.png" id="2_nsnf1"]
[ext_resource type="AudioStream" uid="uid://c0jveij17p14k" path="res://src/audio/sfx/ENEMY_EDEN_PILLAR_PROJECTILETRAVEL.ogg" id="3_1sxke"]
[sub_resource type="Resource" id="Resource_nsnf1"]
script = ExtResource("2_c6b2i")
Damage = 10
ElementType = 1
metadata/_custom_type_script = "uid://ctshiyffvt4y5"
[sub_resource type="AtlasTexture" id="AtlasTexture_okqig"]
atlas = ExtResource("2_nsnf1")
region = Rect2(256, 0, 256, 256)
@@ -957,8 +950,7 @@ _data = {
[node name="Projectile3" type="Node3D"]
transform = Transform3D(-0.529919, 0, -0.848048, 0, 1, 0, 0.848048, 0, -0.529919, 0, 0, 0)
script = ExtResource("1_c6b2i")
AttackData = SubResource("Resource_nsnf1")
script = ExtResource("1_i8gam")
[node name="Bullet" type="Node3D" parent="."]

View File

@@ -22,7 +22,7 @@ radius = 1.0
radius = 2.04204
[sub_resource type="CylinderShape3D" id="CylinderShape3D_c82i6"]
radius = 2.5
radius = 3.2168
[node name="Palan" type="CharacterBody3D" groups=["enemy"]]
process_mode = 1
@@ -34,12 +34,12 @@ script = ExtResource("1_2upgt")
[node name="CollisionShape" type="CollisionShape3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1.51919, 0)
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1.93241, 0)
shape = SubResource("CapsuleShape3D_cwfph")
[node name="LineOfSight" type="Area3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1.51919, 0)
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1.93241, 0)
collision_layer = 2
collision_mask = 2
@@ -54,7 +54,7 @@ target_position = Vector3(0, 0, -5)
collision_mask = 3
[node name="Collision" type="Area3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.51919, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.93241, 0)
collision_layer = 2048
collision_mask = 0
@@ -67,7 +67,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.00132132, 0)
[node name="PlayerDetector" type="Area3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.51919, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.93241, 0)
collision_layer = 0
collision_mask = 34
@@ -75,7 +75,7 @@ collision_mask = 34
shape = SubResource("CylinderShape3D_c82i6")
[node name="Components" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.51919, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.93241, 0)
[node name="PatrolBehavior" parent="Components" instance=ExtResource("4_3ogbp")]
unique_name_in_owner = true
@@ -94,7 +94,7 @@ avoidance_enabled = true
radius = 1.0
[node name="HitSounds" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.51919, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.93241, 0)
[node name="AbsorbSFX" type="AudioStreamPlayer3D" parent="HitSounds"]
unique_name_in_owner = true

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=324 format=3 uid="uid://cuar5bbhxie4r"]
[gd_scene load_steps=327 format=3 uid="uid://cuar5bbhxie4r"]
[ext_resource type="Script" uid="uid://cvr1qimxpignl" path="res://src/enemy/EnemyModelView2D.cs" id="1_yke7o"]
[ext_resource type="Texture2D" uid="uid://cob5mo4lrbkrp" path="res://src/enemy/enemy_types/11. Palan/animations/B/frame_000_delay-0.01s.png" id="2_lf0wi"]
@@ -211,6 +211,7 @@
[ext_resource type="Texture2D" uid="uid://bn83xiolaxr6j" path="res://src/vfx/Enemy/PALANQUIN ATTACK 1.png" id="208_1bumx"]
[ext_resource type="PackedScene" uid="uid://dmyi1egj1veaw" path="res://src/enemy/enemy_types/11. Palan/PalanProjectile1.tscn" id="210_lid5r"]
[ext_resource type="PackedScene" uid="uid://diwcxxt650jtp" path="res://src/enemy/enemy_types/11. Palan/PalanProjectile2.tscn" id="211_au0i1"]
[ext_resource type="Script" uid="uid://ctshiyffvt4y5" path="res://src/system/AttackDataResource.cs" id="211_jbc40"]
[ext_resource type="Texture2D" uid="uid://dafpnwkwcukp4" path="res://src/vfx/shadow_test_1.png" id="212_lid5r"]
[sub_resource type="ViewportTexture" id="ViewportTexture_h1kaf"]
@@ -1860,25 +1861,33 @@ tracks/3/keys = {
"times": PackedFloat32Array(0.333333)
}
tracks/3/use_blend = true
tracks/4/type = "animation"
tracks/4/type = "method"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Projectile1/Bullet/AnimationPlayer")
tracks/4/path = NodePath("Projectile1")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"clips": PackedStringArray("Fire"),
"times": PackedFloat32Array(0.333333)
"times": PackedFloat32Array(0.333333),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"Fire"
}]
}
tracks/5/type = "animation"
tracks/5/type = "method"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Projectile2/Bullet/AnimationPlayer")
tracks/5/path = NodePath("Projectile2")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"clips": PackedStringArray("Fire"),
"times": PackedFloat32Array(0.833333)
"times": PackedFloat32Array(0.833333),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"Fire"
}]
}
[sub_resource type="Animation" id="Animation_r6aec"]
@@ -2365,6 +2374,18 @@ states/Walking/position = Vector2(705, 100)
transitions = ["Start", "Idle", SubResource("AnimationNodeStateMachineTransition_0yqqu"), "Primary Attack", "Idle", SubResource("AnimationNodeStateMachineTransition_r6aec"), "Secondary Attack", "Idle", SubResource("AnimationNodeStateMachineTransition_lid5r"), "Idle", "Walking", SubResource("AnimationNodeStateMachineTransition_au0i1"), "Walking", "Idle", SubResource("AnimationNodeStateMachineTransition_jbc40"), "Idle", "Primary Attack", SubResource("AnimationNodeStateMachineTransition_0qt6f"), "Idle", "Secondary Attack", SubResource("AnimationNodeStateMachineTransition_2bn25"), "Walking", "Secondary Attack", SubResource("AnimationNodeStateMachineTransition_h2ml5"), "Walking", "Primary Attack", SubResource("AnimationNodeStateMachineTransition_uma8i")]
graph_offset = Vector2(-36, 110)
[sub_resource type="Resource" id="Resource_0qt6f"]
script = ExtResource("211_jbc40")
Damage = 10
ElementType = 0
metadata/_custom_type_script = "uid://ctshiyffvt4y5"
[sub_resource type="Resource" id="Resource_2bn25"]
script = ExtResource("211_jbc40")
Damage = 10
ElementType = 0
metadata/_custom_type_script = "uid://ctshiyffvt4y5"
[node name="EnemyModelView" type="Node3D"]
script = ExtResource("1_yke7o")
@@ -2404,7 +2425,8 @@ libraries = {
}
[node name="Sunblast" type="AnimatedSprite3D" parent="Sprite3D/AnimationPlayer2"]
transform = Transform3D(0.335, 0, 0, 0, 0.335, 0, 0, 0, 0.335, -0.546079, 0.441674, 0)
transform = Transform3D(0.335, 0, 0, 0, 0.335, 0, 0, 0, 0.335, -0.546079, 0.441674, 0.207245)
offset = Vector2(150, 400)
sprite_frames = SubResource("SpriteFrames_skutu")
frame = 15
@@ -2445,8 +2467,11 @@ bus = &"SFX"
[node name="Projectile1" parent="." instance=ExtResource("210_lid5r")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.55261, 0)
AttackData = SubResource("Resource_0qt6f")
[node name="Projectile2" parent="." instance=ExtResource("211_au0i1")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.553, 0)
AttackData = SubResource("Resource_2bn25")
[node name="WalkSFX" type="AudioStreamPlayer3D" parent="."]
unique_name_in_owner = true

View File

@@ -1,15 +1,8 @@
[gd_scene load_steps=69 format=3 uid="uid://dmyi1egj1veaw"]
[gd_scene load_steps=67 format=3 uid="uid://dmyi1egj1veaw"]
[ext_resource type="Script" uid="uid://cqm6u7qa8japr" path="res://src/system/Projectile.cs" id="1_mm1vd"]
[ext_resource type="Script" uid="uid://ctshiyffvt4y5" path="res://src/system/AttackDataResource.cs" id="2_hcom0"]
[ext_resource type="Script" uid="uid://bbvi33wy7w7d5" path="res://src/system/EnemyProjectile.cs" id="1_mm1vd"]
[ext_resource type="Texture2D" uid="uid://dy8vmgvihf313" path="res://src/vfx/Enemy/sunlance.png" id="2_te66n"]
[sub_resource type="Resource" id="Resource_r600j"]
script = ExtResource("2_hcom0")
Damage = 10
ElementType = 0
metadata/_custom_type_script = "uid://ctshiyffvt4y5"
[sub_resource type="AtlasTexture" id="AtlasTexture_lid5r"]
atlas = ExtResource("2_te66n")
region = Rect2(512, 0, 512, 512)
@@ -474,6 +467,17 @@ tracks/2/keys = {
"update": 1,
"values": [false, true]
}
tracks/3/type = "method"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("../..")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(),
"transitions": PackedFloat32Array(),
"values": []
}
[sub_resource type="Animation" id="Animation_8qeb2"]
length = 0.001
@@ -510,7 +514,6 @@ _data = {
[node name="Projectile1" type="Node3D"]
script = ExtResource("1_mm1vd")
AttackData = SubResource("Resource_r600j")
[node name="Bullet" type="Node3D" parent="."]
visible = false
@@ -542,6 +545,7 @@ unique_name_in_owner = true
collision_layer = 0
collision_mask = 64
monitoring = false
monitorable = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="Bullet/ProjectileHitbox"]
shape = SubResource("SphereShape3D_kct8n")

View File

@@ -1,14 +1,7 @@
[gd_scene load_steps=69 format=3 uid="uid://diwcxxt650jtp"]
[gd_scene load_steps=67 format=3 uid="uid://diwcxxt650jtp"]
[ext_resource type="Script" uid="uid://cqm6u7qa8japr" path="res://src/system/Projectile.cs" id="1_k72x7"]
[ext_resource type="Script" uid="uid://bbvi33wy7w7d5" path="res://src/system/EnemyProjectile.cs" id="1_k72x7"]
[ext_resource type="Texture2D" uid="uid://dy8vmgvihf313" path="res://src/vfx/Enemy/sunlance.png" id="2_aistn"]
[ext_resource type="Script" uid="uid://ctshiyffvt4y5" path="res://src/system/AttackDataResource.cs" id="2_xmeva"]
[sub_resource type="Resource" id="Resource_p6eoq"]
script = ExtResource("2_xmeva")
Damage = 10
ElementType = 0
metadata/_custom_type_script = "uid://ctshiyffvt4y5"
[sub_resource type="AtlasTexture" id="AtlasTexture_lid5r"]
atlas = ExtResource("2_aistn")
@@ -435,25 +428,13 @@ animations = [{
[sub_resource type="Animation" id="Animation_xrn7e"]
resource_name = "fire"
tracks/0/type = "value"
tracks/0/type = "audio"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("..:position")
tracks/0/path = NodePath("../AudioStreamPlayer3D")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, 0, 1.4), Vector3(0, 0, 35)]
}
tracks/1/type = "audio"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("../AudioStreamPlayer3D")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"clips": [{
"end_offset": 0.0,
"start_offset": 0.0,
@@ -461,34 +442,7 @@ tracks/1/keys = {
}],
"times": PackedFloat32Array(0.0333333)
}
tracks/1/use_blend = true
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath(".:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.0333333, 1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [false, true, false]
}
[sub_resource type="Animation" id="Animation_8qeb2"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("..:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 0)]
}
tracks/0/use_blend = true
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
@@ -496,6 +450,33 @@ tracks/1/path = NodePath(".:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.0333333, 1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [false, true, false]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath(".:position")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.0333333, 1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, 0, 0), Vector3(0, 0, 35)]
}
[sub_resource type="Animation" id="Animation_8qeb2"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
@@ -510,9 +491,9 @@ _data = {
[node name="Projectile2" type="Node3D"]
script = ExtResource("1_k72x7")
AttackData = SubResource("Resource_p6eoq")
[node name="Bullet" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 35)
visible = false
[node name="AnimatedSprite3D2" type="AnimatedSprite3D" parent="Bullet"]

View File

@@ -10,8 +10,8 @@
[ext_resource type="AudioStream" uid="uid://bf7adfdd857hw" path="res://src/audio/sfx/enemy_morph.ogg" id="8_gxnga"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_cwfph"]
radius = 0.997878
height = 2.02807
radius = 1.6
height = 3.21239
[sub_resource type="CylinderShape3D" id="CylinderShape3D_jbgmx"]
height = 5.0
@@ -33,12 +33,12 @@ script = ExtResource("1_8b86o")
[node name="CollisionShape" type="CollisionShape3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 2.82091, 0)
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 2.09575, 0)
shape = SubResource("CapsuleShape3D_cwfph")
[node name="LineOfSight" type="Area3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 2.82091, 0)
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 2.09575, 0)
collision_layer = 2
collision_mask = 2
@@ -53,7 +53,7 @@ target_position = Vector3(0, 0, -5)
collision_mask = 3
[node name="Collision" type="Area3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.82091, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.09575, 0)
collision_layer = 2048
collision_mask = 0
@@ -66,7 +66,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0124374, 0)
[node name="PlayerDetector" type="Area3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.82091, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.09575, 0)
collision_layer = 0
collision_mask = 34
@@ -74,7 +74,7 @@ collision_mask = 34
shape = SubResource("CylinderShape3D_gxowl")
[node name="Components" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.82091, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.09575, 0)
[node name="PatrolBehavior" parent="Components" instance=ExtResource("4_5pbfd")]
unique_name_in_owner = true
@@ -93,7 +93,7 @@ avoidance_enabled = true
radius = 1.0
[node name="HitSounds" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.82091, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.09575, 0)
[node name="AbsorbSFX" type="AudioStreamPlayer3D" parent="HitSounds"]
unique_name_in_owner = true

View File

@@ -48,7 +48,6 @@ public class ItemDatabase
var weights = itemsToSelectFrom.Select(x => x.SpawnRate).ToArray();
var selectedItem = itemsToSelectFrom.ToArray()[rng.RandWeighted(weights)];
return selectedItem;
}

View File

@@ -1,15 +1,8 @@
[gd_scene load_steps=64 format=3 uid="uid://ddcw0xw7pxk8r"]
[gd_scene load_steps=62 format=3 uid="uid://ddcw0xw7pxk8r"]
[ext_resource type="Script" uid="uid://cqm6u7qa8japr" path="res://src/system/Projectile.cs" id="1_xt24t"]
[ext_resource type="Script" uid="uid://ctshiyffvt4y5" path="res://src/system/AttackDataResource.cs" id="2_yf47k"]
[ext_resource type="Script" uid="uid://cytefxt38q6r7" path="res://src/system/PlayerProjectile.cs" id="1_titwo"]
[ext_resource type="Texture2D" uid="uid://ddmjhevb5ksl" path="res://src/vfx/Items Etc/geomantic_reactor_AIR.png" id="3_c0ubq"]
[sub_resource type="Resource" id="Resource_kcnxw"]
script = ExtResource("2_yf47k")
Damage = 10
ElementType = 1
metadata/_custom_type_script = "uid://ctshiyffvt4y5"
[sub_resource type="AtlasTexture" id="AtlasTexture_wsimg"]
atlas = ExtResource("3_c0ubq")
region = Rect2(0, 0, 512, 512)
@@ -519,8 +512,7 @@ _data = {
[sub_resource type="SphereShape3D" id="SphereShape3D_xt24t"]
[node name="AirReactor" type="Node3D"]
script = ExtResource("1_xt24t")
AttackData = SubResource("Resource_kcnxw")
script = ExtResource("1_titwo")
[node name="Bullet" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.1, 0)

View File

@@ -1,15 +1,8 @@
[gd_scene load_steps=68 format=3 uid="uid://bredkcfalakdp"]
[gd_scene load_steps=66 format=3 uid="uid://bredkcfalakdp"]
[ext_resource type="Script" uid="uid://cqm6u7qa8japr" path="res://src/system/Projectile.cs" id="1_pk6yq"]
[ext_resource type="Script" uid="uid://ctshiyffvt4y5" path="res://src/system/AttackDataResource.cs" id="2_d874y"]
[ext_resource type="Script" uid="uid://cytefxt38q6r7" path="res://src/system/PlayerProjectile.cs" id="1_fhwm2"]
[ext_resource type="Texture2D" uid="uid://pirfu8nw05gk" path="res://src/vfx/Items Etc/geomantic reactor - fire.png" id="3_6hnq4"]
[sub_resource type="Resource" id="Resource_14f5p"]
script = ExtResource("2_d874y")
Damage = 10
ElementType = 4
metadata/_custom_type_script = "uid://ctshiyffvt4y5"
[sub_resource type="AtlasTexture" id="AtlasTexture_na8n6"]
atlas = ExtResource("3_6hnq4")
region = Rect2(0, 0, 512, 512)
@@ -550,8 +543,7 @@ _data = {
[sub_resource type="SphereShape3D" id="SphereShape3D_pk6yq"]
[node name="FireReactor" type="Node3D"]
script = ExtResource("1_pk6yq")
AttackData = SubResource("Resource_14f5p")
script = ExtResource("1_fhwm2")
[node name="Bullet" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.1, 0)

View File

@@ -1,13 +1,6 @@
[gd_scene load_steps=8 format=3 uid="uid://c4kc2vybdy5t"]
[gd_scene load_steps=6 format=3 uid="uid://c4kc2vybdy5t"]
[ext_resource type="Script" uid="uid://cqm6u7qa8japr" path="res://src/system/Projectile.cs" id="1_7ykt2"]
[ext_resource type="Script" uid="uid://ctshiyffvt4y5" path="res://src/system/AttackDataResource.cs" id="2_3v8me"]
[sub_resource type="Resource" id="Resource_14f5p"]
script = ExtResource("2_3v8me")
Damage = 99
ElementType = 0
metadata/_custom_type_script = "uid://ctshiyffvt4y5"
[ext_resource type="Script" uid="uid://cytefxt38q6r7" path="res://src/system/PlayerProjectile.cs" id="1_bp1ct"]
[sub_resource type="Animation" id="Animation_xrn7e"]
resource_name = "fire"
@@ -49,8 +42,7 @@ _data = {
[sub_resource type="SphereShape3D" id="SphereShape3D_kct8n"]
[node name="Persuader" type="Node3D"]
script = ExtResource("1_7ykt2")
AttackData = SubResource("Resource_14f5p")
script = ExtResource("1_bp1ct")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
unique_name_in_owner = true

View File

@@ -1,15 +1,8 @@
[gd_scene load_steps=79 format=3 uid="uid://dluot8v3m0drs"]
[gd_scene load_steps=77 format=3 uid="uid://dluot8v3m0drs"]
[ext_resource type="Script" uid="uid://cqm6u7qa8japr" path="res://src/system/Projectile.cs" id="1_n88a7"]
[ext_resource type="Script" uid="uid://ctshiyffvt4y5" path="res://src/system/AttackDataResource.cs" id="2_er0le"]
[ext_resource type="Script" uid="uid://cytefxt38q6r7" path="res://src/system/PlayerProjectile.cs" id="1_yb0m4"]
[ext_resource type="Texture2D" uid="uid://dykncj5nomejo" path="res://src/vfx/Items Etc/GEOMANTIC_REACTOR_WATER.png" id="3_csu6k"]
[sub_resource type="Resource" id="Resource_k6pkx"]
script = ExtResource("2_er0le")
Damage = 10
ElementType = 3
metadata/_custom_type_script = "uid://ctshiyffvt4y5"
[sub_resource type="AtlasTexture" id="AtlasTexture_1yaxx"]
atlas = ExtResource("3_csu6k")
region = Rect2(0, 0, 512, 512)
@@ -624,8 +617,7 @@ _data = {
[sub_resource type="SphereShape3D" id="SphereShape3D_n88a7"]
[node name="WaterReactor" type="Node3D"]
script = ExtResource("1_n88a7")
AttackData = SubResource("Resource_k6pkx")
script = ExtResource("1_yb0m4")
[node name="Bullet" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.1, 0)

View File

@@ -16,6 +16,11 @@ public partial class Weapon : Node3D, IWeapon
public SoundEffect SoundEffect => Stats.SoundEffect;
public Weapon()
{
Init();
}
public override void _Ready()
{
Init();

View File

@@ -24,19 +24,19 @@ public static class LayoutToScenePathConverter
switch (floorType)
{
case SpecialFloorType.Overworld:
return path + files.Single(x => x.Contains("Overworld.tscn"));
return path + files.Single(x => x.EndsWith("Overworld.tscn"));
case SpecialFloorType.Altar:
return path + files.Single(x => x.Contains("Altar.tscn"));
return path + files.Single(x => x.EndsWith("Altar.tscn"));
case SpecialFloorType.BossFloorA:
return path + files.Single(x => x.Contains("Boss Floor A.tscn"));
return path + files.Single(x => x.EndsWith("Boss Floor A.tscn"));
case SpecialFloorType.BossFloorB:
return path + files.Single(x => x.Contains("Boss Floor B.tscn"));
return path + files.Single(x => x.EndsWith("Boss Floor B.tscn"));
case SpecialFloorType.GoddessOfGuidanceFloor:
return path + files.Single(x => x.Contains("Goddess of Guidance's Room.tscn"));
return path + files.Single(x => x.EndsWith("Goddess of Guidance's Room.tscn"));
case SpecialFloorType.TrueGoddessOfGuidanceFloor:
return path + files.Single(x => x.Contains("Goddess of Guidance's Room - True Form.tscn"));
return path + files.Single(x => x.EndsWith("Goddess of Guidance's Room - True Form.tscn"));
case SpecialFloorType.FinalFloor:
return path + files.Single(x => x.Contains("Final Floor.tscn"));
return path + files.Single(x => x.EndsWith("Final Floor.tscn"));
default:
throw new NotImplementedException();
}

File diff suppressed because one or more lines are too long

View File

@@ -94,10 +94,10 @@ public partial class Player : CharacterBody3D, IPlayer, IProvide<IPlayer>
[Node] private ShakeCamera _camera3D { get; set; } = default!;
[Node] private Projectile FireReactor { get; set; } = default!;
[Node] private Projectile AirReactor { get; set; } = default!;
[Node] private Projectile WaterReactor { get; set; } = default!;
[Node] private Projectile PersuaderBullet { get; set; } = default!;
[Node] private PlayerProjectile FireReactor { get; set; } = default!;
[Node] private PlayerProjectile AirReactor { get; set; } = default!;
[Node] private PlayerProjectile WaterReactor { get; set; } = default!;
[Node] private PlayerProjectile PersuaderBullet { get; set; } = default!;
[Node] private Sprite2D PersuaderCrosshair { get; set; } = default!;
#endregion

View File

@@ -0,0 +1,77 @@
using Chickensoft.AutoInject;
using Chickensoft.Introspection;
using Godot;
using Zennysoft.Game.Ma;
using Zennysoft.Ma.Adapter;
using Zennysoft.Ma.Adapter.Entity;
[Meta(typeof(IAutoNode))]
public partial class EnemyProjectile : Node3D
{
public override void _Notification(int what) => this.Notify(what);
[Dependency] protected IMap _map => this.DependOn<IMap>();
[Dependency] protected IPlayer _player => this.DependOn<IPlayer>();
[Node] public Area3D ProjectileHitbox { get; set; }
[Node] public AnimationPlayer AnimationPlayer { get; set; }
[Export] public AttackDataResource AttackData { get; set; }
public void OnReady()
{
ProjectileHitbox.AreaEntered += Hitbox_AreaEntered;
ProjectileHitbox.BodyEntered += ProjectileHitbox_BodyEntered1;
ProjectileHitbox.BodyShapeEntered += ProjectileHitbox_BodyEntered;
AnimationPlayer.AnimationFinished += AnimationPlayer_AnimationFinished;
AnimationPlayer.Play("RESET");
}
private void AnimationPlayer_AnimationFinished(StringName animName)
{
if (animName != "Fire")
return;
ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitorable, false);
ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitoring, false);
AnimationPlayer.Stop();
AnimationPlayer.Play("RESET");
}
private void ProjectileHitbox_BodyEntered1(Node3D body)
{
ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitorable, false);
ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitoring, false);
AnimationPlayer.Stop();
AnimationPlayer.Play("RESET");
}
private void ProjectileHitbox_BodyEntered(Rid bodyRid, Node3D body, long bodyShapeIndex, long localShapeIndex)
{
AnimationPlayer.Stop();
AnimationPlayer.Play("RESET");
}
public bool Fire()
{
if (AnimationPlayer.IsPlaying())
return false;
GlobalBasis = GetOwner<IEnemyModelView>().GetOwner<IEnemy>().GlobalBasis;
ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitorable, true);
ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitoring, true);
AnimationPlayer.Play("Fire");
return true;
}
private void Hitbox_AreaEntered(Area3D area)
{
if (area.GetOwner() is IPlayer player)
player.TakeDamage(new AttackData(AttackData.Damage, AttackData.ElementType));
ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitorable, false);
ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitoring, false);
AnimationPlayer.Stop();
AnimationPlayer.Play("RESET");
}
}

View File

@@ -0,0 +1 @@
uid://bbvi33wy7w7d5

View File

@@ -1,13 +1,12 @@
using Chickensoft.AutoInject;
using Chickensoft.Introspection;
using Godot;
using System;
using Zennysoft.Game.Ma;
using Zennysoft.Ma.Adapter;
using Zennysoft.Ma.Adapter.Entity;
[Meta(typeof(IAutoNode))]
public partial class Projectile : Node3D
public partial class PlayerProjectile : Node3D
{
public override void _Notification(int what) => this.Notify(what);
@@ -27,13 +26,17 @@ public partial class Projectile : Node3D
ProjectileHitbox.BodyEntered += ProjectileHitbox_BodyEntered1;
ProjectileHitbox.BodyShapeEntered += ProjectileHitbox_BodyEntered;
AnimationPlayer.AnimationFinished += AnimationPlayer_AnimationFinished;
AnimationPlayer.Play("RESET");
}
private void AnimationPlayer_AnimationFinished(StringName animName)
{
if (animName != "Fire")
return;
ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitorable, false);
ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitoring, false);
AnimationPlayer.Stop();
AnimationPlayer.Play("RESET");
}
private void ProjectileHitbox_BodyEntered1(Node3D body)
@@ -41,11 +44,13 @@ public partial class Projectile : Node3D
ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitorable, false);
ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitoring, false);
AnimationPlayer.Stop();
AnimationPlayer.Play("RESET");
}
private void ProjectileHitbox_BodyEntered(Rid bodyRid, Node3D body, long bodyShapeIndex, long localShapeIndex)
{
AnimationPlayer.Stop();
AnimationPlayer.Play("RESET");
}
public bool Fire()
@@ -74,5 +79,6 @@ public partial class Projectile : Node3D
ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitorable, false);
ProjectileHitbox.SetDeferred(Area3D.PropertyName.Monitoring, false);
AnimationPlayer.Stop();
AnimationPlayer.Play("RESET");
}
}