Fix capricorn projectile bug
This commit is contained in:
@@ -4,7 +4,7 @@ using Godot;
|
|||||||
public partial class FireAtPlayer : Timer
|
public partial class FireAtPlayer : Timer
|
||||||
{
|
{
|
||||||
[Export]
|
[Export]
|
||||||
private Area3D _enemy;
|
private BasicEnemy _enemy;
|
||||||
[Export]
|
[Export]
|
||||||
private PackedScene _fireProjectile;
|
private PackedScene _fireProjectile;
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ public partial class FireAtPlayer : Timer
|
|||||||
var projectile = _fireProjectile.Instantiate<Projectile>() as EnemyBullet;
|
var projectile = _fireProjectile.Instantiate<Projectile>() as EnemyBullet;
|
||||||
projectile.Rotation = new Vector3(0, _enemy.Rotation.Y, 0);
|
projectile.Rotation = new Vector3(0, _enemy.Rotation.Y, 0);
|
||||||
projectile.Position = _enemy.Position;
|
projectile.Position = _enemy.Position;
|
||||||
GetParent().AddChild(projectile);
|
AddChild(projectile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ 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, -2.58153, 0, -1.66413)
|
||||||
collision_layer = 0
|
collision_layer = 0
|
||||||
collision_mask = 4
|
collision_mask = 8
|
||||||
continuous_cd = true
|
continuous_cd = true
|
||||||
max_contacts_reported = 1
|
max_contacts_reported = 1
|
||||||
contact_monitor = true
|
contact_monitor = true
|
||||||
|
|||||||
@@ -1,75 +0,0 @@
|
|||||||
shader_type spatial;
|
|
||||||
render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_burley;
|
|
||||||
|
|
||||||
uniform vec4 color: source_color = vec4(0.5, 0.4, 0.4, 1.0);
|
|
||||||
uniform float shade_tweak;
|
|
||||||
uniform float light_tweak;
|
|
||||||
uniform float sharpness;
|
|
||||||
uniform float scale;
|
|
||||||
|
|
||||||
const mat4 dither = mat4(
|
|
||||||
vec4(0.0, 0.5333333333, 0.1333333333, 0.6666666667),
|
|
||||||
vec4(0.8, 0.2666666667, 0.9333333333, 0.4),
|
|
||||||
vec4(0.2, 0.7333333333, 0.06666666667, 0.6),
|
|
||||||
vec4(1.0, 0.4666666667, 0.8666666667, 0.3333333333)
|
|
||||||
);
|
|
||||||
|
|
||||||
void fragment() {
|
|
||||||
ALBEDO = COLOR.rgb * color.rgb;
|
|
||||||
}
|
|
||||||
|
|
||||||
float sample(vec2 coord, float alpha, float shade, float lit) {
|
|
||||||
int x = int(mod(coord.x, 4));
|
|
||||||
int y = int(mod(coord.y, 4));
|
|
||||||
if (y == 0) {
|
|
||||||
if (x == 0 && dither[0][0] >= alpha) {
|
|
||||||
return shade;
|
|
||||||
} else if (x == 1 && dither[0][1] >= alpha) {
|
|
||||||
return shade;
|
|
||||||
} else if (x == 2 && dither[0][2] >= alpha) {
|
|
||||||
return shade;
|
|
||||||
} else if (x == 3 && dither[0][3] >= alpha) {
|
|
||||||
return shade;
|
|
||||||
}
|
|
||||||
} else if (y == 1) {
|
|
||||||
if (x == 0 && dither[1][0] >= alpha) {
|
|
||||||
return shade;
|
|
||||||
} else if (x == 1 && dither[1][1] >= alpha) {
|
|
||||||
return shade;
|
|
||||||
} else if (x == 2 && dither[1][2] >= alpha) {
|
|
||||||
return shade;
|
|
||||||
} else if (x == 3 && dither[1][3] >= alpha) {
|
|
||||||
return shade;
|
|
||||||
}
|
|
||||||
} else if (y == 2) {
|
|
||||||
if (x == 0 && dither[2][0] >= alpha) {
|
|
||||||
return shade;
|
|
||||||
} else if (x == 1 && dither[2][1] >= alpha) {
|
|
||||||
return shade;
|
|
||||||
} else if (x == 2 && dither[2][2] >= alpha) {
|
|
||||||
return shade;
|
|
||||||
} else if (x == 3 && dither[2][3] >= alpha) {
|
|
||||||
return shade;
|
|
||||||
}
|
|
||||||
} else if (y == 3) {
|
|
||||||
if (x == 0 && dither[3][0] >= alpha) {
|
|
||||||
return shade;
|
|
||||||
} else if (x == 1 && dither[3][1] >= alpha) {
|
|
||||||
return shade;
|
|
||||||
} else if (x == 2 && dither[3][2] >= alpha) {
|
|
||||||
return shade;
|
|
||||||
} else if (x == 3 && dither[3][3] >= alpha) {
|
|
||||||
return shade;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return lit;
|
|
||||||
}
|
|
||||||
|
|
||||||
void light() {
|
|
||||||
float a = sample(
|
|
||||||
FRAGCOORD.xy * (1.0 / scale),
|
|
||||||
clamp(dot(NORMAL, LIGHT) + sharpness, 0.0, 1.0 + sharpness) * 1.0f,
|
|
||||||
shade_tweak,
|
|
||||||
light_tweak);
|
|
||||||
DIFFUSE_LIGHT += ALBEDO * a;
|
|
||||||
}
|
|
||||||
@@ -1,13 +1,10 @@
|
|||||||
[gd_scene load_steps=48 format=3 uid="uid://bt5rolsyjmx55"]
|
[gd_scene load_steps=47 format=3 uid="uid://bt5rolsyjmx55"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://Enemies/Scripts/MeleeEnemy.cs" id="1_50och"]
|
[ext_resource type="Script" path="res://Enemies/Scripts/MeleeEnemy.cs" id="1_50och"]
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_1nq5h"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_1nq5h"]
|
||||||
size = Vector3(0.579358, 2.18762, 0.423598)
|
size = Vector3(0.579358, 2.18762, 0.423598)
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_i1yvp"]
|
|
||||||
size = Vector3(0.470892, 2.18133, 0.423598)
|
|
||||||
|
|
||||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_hp6tg"]
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_hp6tg"]
|
||||||
resource_name = "Material.003"
|
resource_name = "Material.003"
|
||||||
cull_mode = 2
|
cull_mode = 2
|
||||||
@@ -1176,85 +1173,72 @@ _data = {
|
|||||||
"Animation": SubResource("Animation_xyhqi")
|
"Animation": SubResource("Animation_xyhqi")
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="MeleeEnemyOrb" type="Node3D" groups=["Enemy"]]
|
[node name="Melee Enemy" type="CharacterBody3D" groups=["Enemy"]]
|
||||||
script = ExtResource("1_50och")
|
|
||||||
|
|
||||||
[node name="CharacterBody3D" type="RigidBody3D" parent="."]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.251952, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.251952, 0)
|
||||||
collision_layer = 0
|
collision_layer = 0
|
||||||
|
collision_mask = 5
|
||||||
axis_lock_angular_x = true
|
axis_lock_angular_x = true
|
||||||
|
script = ExtResource("1_50och")
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="CharacterBody3D"]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0840461, 0.475385, 0.143401)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0840461, 0.475385, 0.143401)
|
||||||
shape = SubResource("BoxShape3D_1nq5h")
|
shape = SubResource("BoxShape3D_1nq5h")
|
||||||
|
|
||||||
[node name="meleeenemy - Updated" type="Node3D" parent="CharacterBody3D/CollisionShape3D"]
|
[node name="MeleeEnemy" type="Node3D" parent="CollisionShape3D"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0840461, -0.475385, -0.143401)
|
|
||||||
|
|
||||||
[node name="Area3D" type="Area3D" parent="CharacterBody3D/CollisionShape3D"]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0840461, -0.475385, -0.143401)
|
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 0
|
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="CharacterBody3D/CollisionShape3D/Area3D"]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0840461, 0.475385, 0.143401)
|
|
||||||
shape = SubResource("BoxShape3D_i1yvp")
|
|
||||||
|
|
||||||
[node name="MeleeEnemy" type="Node3D" parent="CharacterBody3D/CollisionShape3D"]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0840461, -0.010569, -0.143401)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0840461, -0.010569, -0.143401)
|
||||||
|
|
||||||
[node name="Icosphere001" type="MeshInstance3D" parent="CharacterBody3D/CollisionShape3D/MeleeEnemy"]
|
[node name="Icosphere001" type="MeshInstance3D" parent="CollisionShape3D/MeleeEnemy"]
|
||||||
transform = Transform3D(0.850843, 0, 0, 0, 0.850843, 0, 0, 0, 0.850843, 0.0805536, 0.468312, 0.158035)
|
transform = Transform3D(0.850843, 0, 0, 0, 0.850843, 0, 0, 0, 0.850843, 0.0805536, 0.468312, 0.158035)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_vf33t")
|
mesh = SubResource("ArrayMesh_vf33t")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Circle001" type="MeshInstance3D" parent="CharacterBody3D/CollisionShape3D/MeleeEnemy"]
|
[node name="Circle001" type="MeshInstance3D" parent="CollisionShape3D/MeleeEnemy"]
|
||||||
transform = Transform3D(1.05, 0, 0, 0, 1.05, 0, 0, 0, 1.05, 0.0457887, 0.476383, 0.128917)
|
transform = Transform3D(1.05, 0, 0, 0, 1.05, 0, 0, 0, 1.05, 0.0457887, 0.476383, 0.128917)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_ngagc")
|
mesh = SubResource("ArrayMesh_ngagc")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Circle002" type="MeshInstance3D" parent="CharacterBody3D/CollisionShape3D/MeleeEnemy"]
|
[node name="Circle002" type="MeshInstance3D" parent="CollisionShape3D/MeleeEnemy"]
|
||||||
transform = Transform3D(1.1, 0, 0, 0, 1.1, 0, 0, 0, 1.1, 0.0659095, 0.483551, 0.119628)
|
transform = Transform3D(1.1, 0, 0, 0, 1.1, 0, 0, 0, 1.1, 0.0659095, 0.483551, 0.119628)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_nmeup")
|
mesh = SubResource("ArrayMesh_nmeup")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Circle004" type="MeshInstance3D" parent="CharacterBody3D/CollisionShape3D/MeleeEnemy"]
|
[node name="Circle004" type="MeshInstance3D" parent="CollisionShape3D/MeleeEnemy"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0868937, 0.567455, 0.186096)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0868937, 0.567455, 0.186096)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_nso1s")
|
mesh = SubResource("ArrayMesh_nso1s")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Text003" type="MeshInstance3D" parent="CharacterBody3D/CollisionShape3D/MeleeEnemy"]
|
[node name="Text003" type="MeshInstance3D" parent="CollisionShape3D/MeleeEnemy"]
|
||||||
transform = Transform3D(0.0536953, 0, 0, 0, 0.0536953, 0, 0, 0, 0.0536953, 0.0626427, 0.123465, 0.11049)
|
transform = Transform3D(0.0536953, 0, 0, 0, 0.0536953, 0, 0, 0, 0.0536953, 0.0626427, 0.123465, 0.11049)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_xasdc")
|
mesh = SubResource("ArrayMesh_xasdc")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="BezierCircle" type="Node3D" parent="CharacterBody3D/CollisionShape3D/MeleeEnemy"]
|
[node name="BezierCircle" type="Node3D" parent="CollisionShape3D/MeleeEnemy"]
|
||||||
transform = Transform3D(0.495255, 0, 0, 0, 0.495255, 0, 0, 0, 0.495255, 0.0690689, -0.0909151, 0.128142)
|
transform = Transform3D(0.495255, 0, 0, 0, 0.495255, 0, 0, 0, 0.495255, 0.0690689, -0.0909151, 0.128142)
|
||||||
|
|
||||||
[node name="Text004" type="MeshInstance3D" parent="CharacterBody3D/CollisionShape3D/MeleeEnemy"]
|
[node name="Text004" type="MeshInstance3D" parent="CollisionShape3D/MeleeEnemy"]
|
||||||
transform = Transform3D(0.0480592, 0, 0, 0, 0.0480592, 0, 0, 0, 0.0480592, 0.0626427, 0.123465, 0.11049)
|
transform = Transform3D(0.0480592, 0, 0, 0, 0.0480592, 0, 0, 0, 0.0480592, 0.0626427, 0.123465, 0.11049)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_8gdy4")
|
mesh = SubResource("ArrayMesh_8gdy4")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="BezierCircle001" type="Node3D" parent="CharacterBody3D/CollisionShape3D/MeleeEnemy"]
|
[node name="BezierCircle001" type="Node3D" parent="CollisionShape3D/MeleeEnemy"]
|
||||||
transform = Transform3D(0.443271, 0, 0, 0, 0.443271, 0, 0, 0, 0.443271, 0.0690689, -0.0909151, 0.128142)
|
transform = Transform3D(0.443271, 0, 0, 0, 0.443271, 0, 0, 0, 0.443271, 0.0690689, -0.0909151, 0.128142)
|
||||||
|
|
||||||
[node name="Text005" type="MeshInstance3D" parent="CharacterBody3D/CollisionShape3D/MeleeEnemy"]
|
[node name="Text005" type="MeshInstance3D" parent="CollisionShape3D/MeleeEnemy"]
|
||||||
transform = Transform3D(0.0438454, 0, 0, 0, 0.0438454, 0, 0, 0, 0.0438454, 0.0626427, 0.123465, 0.11049)
|
transform = Transform3D(0.0438454, 0, 0, 0, 0.0438454, 0, 0, 0, 0.0438454, 0.0626427, 0.123465, 0.11049)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_bkeh8")
|
mesh = SubResource("ArrayMesh_bkeh8")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="BezierCircle002" type="Node3D" parent="CharacterBody3D/CollisionShape3D/MeleeEnemy"]
|
[node name="BezierCircle002" type="Node3D" parent="CollisionShape3D/MeleeEnemy"]
|
||||||
transform = Transform3D(0.404405, 0, 0, 0, 0.404405, 0, 0, 0, 0.404405, 0.0690689, -0.0909151, 0.128142)
|
transform = Transform3D(0.404405, 0, 0, 0, 0.404405, 0, 0, 0, 0.404405, 0.0690689, -0.0909151, 0.128142)
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="CharacterBody3D/CollisionShape3D/MeleeEnemy"]
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="CollisionShape3D/MeleeEnemy"]
|
||||||
libraries = {
|
libraries = {
|
||||||
"": SubResource("AnimationLibrary_ivhl3")
|
"": SubResource("AnimationLibrary_ivhl3")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -890,177 +890,168 @@ _surfaces = [{
|
|||||||
blend_shape_mode = 0
|
blend_shape_mode = 0
|
||||||
shadow_mesh = SubResource("ArrayMesh_j7wsk")
|
shadow_mesh = SubResource("ArrayMesh_j7wsk")
|
||||||
|
|
||||||
[node name="RangedEnemy" type="Node3D"]
|
[node name="CharacterBody" type="CharacterBody3D" groups=["Enemy"]]
|
||||||
script = ExtResource("1_01lvj")
|
|
||||||
|
|
||||||
[node name="CharacterBody" type="CharacterBody3D" parent="." groups=["Enemy"]]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.257979, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.257979, 0)
|
||||||
collision_layer = 0
|
collision_layer = 0
|
||||||
|
collision_mask = 9
|
||||||
|
script = ExtResource("1_01lvj")
|
||||||
|
|
||||||
[node name="Timer" type="Timer" parent="CharacterBody" node_paths=PackedStringArray("_enemy")]
|
[node name="Timer" type="Timer" parent="." node_paths=PackedStringArray("_enemy")]
|
||||||
wait_time = 3.0
|
wait_time = 3.0
|
||||||
autostart = true
|
autostart = true
|
||||||
script = ExtResource("3_qt2md")
|
script = ExtResource("3_qt2md")
|
||||||
_enemy = NodePath("../Area3D")
|
_enemy = NodePath("..")
|
||||||
_fireProjectile = ExtResource("3_qenx3")
|
_fireProjectile = ExtResource("3_qenx3")
|
||||||
|
|
||||||
[node name="Area3D" type="Area3D" parent="CharacterBody"]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.113206, 0.857215, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0714533, 0.795379, 0.0138905)
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 0
|
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="CharacterBody/Area3D"]
|
|
||||||
shape = SubResource("BoxShape3D_dm3u7")
|
shape = SubResource("BoxShape3D_dm3u7")
|
||||||
|
|
||||||
[node name="ranged enemy" type="Node3D" parent="CharacterBody/Area3D"]
|
[node name="ranged enemy" type="Node3D" parent="."]
|
||||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -0.113206, -0.357215, 0)
|
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0.5, 0)
|
||||||
|
|
||||||
[node name="Cube" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_q32da")
|
mesh = SubResource("ArrayMesh_q32da")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Plane" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Plane" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(-0.0100222, 0.0018531, -0.000882675, 1.93522e-05, -0.00431383, -0.00927625, -0.00205249, -0.00908929, 0.00422261, -0.303114, 0.427881, 0.058823)
|
transform = Transform3D(-0.0100222, 0.0018531, -0.000882675, 1.93522e-05, -0.00431383, -0.00927625, -0.00205249, -0.00908929, 0.00422261, -0.303114, 0.427881, 0.058823)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_u3ad8")
|
mesh = SubResource("ArrayMesh_u3ad8")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Cube001" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube001" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.315871, -0.0694096, -0.000752944, 0.0682386, 0.311148, -0.0558839, 0.0127182, 0.0544227, 0.318542, -0.0773843, 0.835929, -0.0333594)
|
transform = Transform3D(0.315871, -0.0694096, -0.000752944, 0.0682386, 0.311148, -0.0558839, 0.0127182, 0.0544227, 0.318542, -0.0773843, 0.835929, -0.0333594)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_rm34g")
|
mesh = SubResource("ArrayMesh_rm34g")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Cube002" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube002" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.313807, -0.0597582, 0.0504638, 0.0682386, 0.311148, -0.0558839, -0.0382248, 0.0648728, 0.31452, -0.0636578, 0.633983, -0.0944303)
|
transform = Transform3D(0.313807, -0.0597582, 0.0504638, 0.0682386, 0.311148, -0.0558839, -0.0382248, 0.0648728, 0.31452, -0.0636578, 0.633983, -0.0944303)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_0bt4x")
|
mesh = SubResource("ArrayMesh_0bt4x")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Cube003" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube003" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.313807, -0.0597582, 0.0504638, 0.0682386, 0.311148, -0.0558839, -0.0382248, 0.0648728, 0.31452, -0.0655749, 0.637828, -0.0946047)
|
transform = Transform3D(0.313807, -0.0597582, 0.0504638, 0.0682386, 0.311148, -0.0558839, -0.0382248, 0.0648728, 0.31452, -0.0655749, 0.637828, -0.0946047)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_8yxbn")
|
mesh = SubResource("ArrayMesh_8yxbn")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Cube004" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube004" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.313807, -0.0597582, 0.0504638, 0.0682386, 0.311148, -0.0558839, -0.0382248, 0.0648728, 0.31452, -0.0655749, 0.637828, -0.0946047)
|
transform = Transform3D(0.313807, -0.0597582, 0.0504638, 0.0682386, 0.311148, -0.0558839, -0.0382248, 0.0648728, 0.31452, -0.0655749, 0.637828, -0.0946047)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_15lqi")
|
mesh = SubResource("ArrayMesh_15lqi")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Cube005" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube005" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.305187, -0.0854223, 0.0644708, 0.0815859, 0.311789, 0.0269073, -0.0692616, -0.00912739, 0.315772, -0.0531487, 0.661378, -0.0700054)
|
transform = Transform3D(0.305187, -0.0854223, 0.0644708, 0.0815859, 0.311789, 0.0269073, -0.0692616, -0.00912739, 0.315772, -0.0531487, 0.661378, -0.0700054)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_mpb1j")
|
mesh = SubResource("ArrayMesh_mpb1j")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Cube006" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube006" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.313807, -0.0597582, 0.0504638, 0.0682386, 0.311148, -0.0558839, -0.0382248, 0.0648728, 0.31452, -0.0655749, 0.637828, -0.0946047)
|
transform = Transform3D(0.313807, -0.0597582, 0.0504638, 0.0682386, 0.311148, -0.0558839, -0.0382248, 0.0648728, 0.31452, -0.0655749, 0.637828, -0.0946047)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_mcinf")
|
mesh = SubResource("ArrayMesh_mcinf")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Cube008" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube008" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_pmc1t")
|
mesh = SubResource("ArrayMesh_pmc1t")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Cube009" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube009" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.313807, -0.0597582, 0.0504638, 0.0682386, 0.311148, -0.0558839, -0.0382248, 0.0648728, 0.31452, -0.0684862, 0.799624, -0.0750265)
|
transform = Transform3D(0.313807, -0.0597582, 0.0504638, 0.0682386, 0.311148, -0.0558839, -0.0382248, 0.0648728, 0.31452, -0.0684862, 0.799624, -0.0750265)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_gtkhd")
|
mesh = SubResource("ArrayMesh_gtkhd")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Cube010" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube010" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_trp2a")
|
mesh = SubResource("ArrayMesh_trp2a")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Cube012" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube012" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_25adi")
|
mesh = SubResource("ArrayMesh_25adi")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Cube014" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube014" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.386719, -0.0654828, -0.0060564, 0.0657464, 0.385777, 0.0270154, 0.00144638, -0.0276482, 0.391293, -0.352872, 0.654756, -0.0707455)
|
transform = Transform3D(0.386719, -0.0654828, -0.0060564, 0.0657464, 0.385777, 0.0270154, 0.00144638, -0.0276482, 0.391293, -0.352872, 0.654756, -0.0707455)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_u67jf")
|
mesh = SubResource("ArrayMesh_u67jf")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Cube019" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube019" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_ariha")
|
mesh = SubResource("ArrayMesh_ariha")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Cube020" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube020" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_xyipj")
|
mesh = SubResource("ArrayMesh_xyipj")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Cube021" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube021" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_jo33y")
|
mesh = SubResource("ArrayMesh_jo33y")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Cube022" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube022" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_7kmmw")
|
mesh = SubResource("ArrayMesh_7kmmw")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Cube026" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube026" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_vfj0q")
|
mesh = SubResource("ArrayMesh_vfj0q")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Circle" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Circle" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(-0.0166754, -0.00145308, 0.00157151, -0.00158678, 0.000108831, -0.0167367, 0.00143639, -0.0167489, -0.000245091, -0.0910357, 0.761053, 0.00444521)
|
transform = Transform3D(-0.0166754, -0.00145308, 0.00157151, -0.00158678, 0.000108831, -0.0167367, 0.00143639, -0.0167489, -0.000245091, -0.0910357, 0.761053, 0.00444521)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_rlqqm")
|
mesh = SubResource("ArrayMesh_rlqqm")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Circle001" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Circle001" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.0164801, 0.00292982, 0.00157151, 0.001504, 0.000517407, -0.0167367, 0.00296504, -0.0165468, -0.000245089, -0.0447078, 0.770397, 0.00533548)
|
transform = Transform3D(0.0164801, 0.00292982, 0.00157151, 0.001504, 0.000517407, -0.0167367, 0.00296504, -0.0165468, -0.000245089, -0.0447078, 0.770397, 0.00533548)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_sjkuu")
|
mesh = SubResource("ArrayMesh_sjkuu")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Cube007" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube007" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_ad76t")
|
mesh = SubResource("ArrayMesh_ad76t")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Cube011" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube011" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_dcy7l")
|
mesh = SubResource("ArrayMesh_dcy7l")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Cube013" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube013" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_tup6f")
|
mesh = SubResource("ArrayMesh_tup6f")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="Cube015" type="MeshInstance3D" parent="CharacterBody/Area3D/ranged enemy"]
|
[node name="Cube015" type="MeshInstance3D" parent="ranged enemy"]
|
||||||
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
transform = Transform3D(0.323408, 0, 0, 0, 0.323408, 0, 0, 0, 0.323408, -0.0862004, 0.632917, -0.0732053)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("ArrayMesh_lu7e3")
|
mesh = SubResource("ArrayMesh_lu7e3")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="CharacterBody"]
|
[connection signal="timeout" from="Timer" to="Timer" method="OnFireAtPlayer"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0714533, 0.795379, 0.0138905)
|
|
||||||
shape = SubResource("BoxShape3D_dm3u7")
|
|
||||||
|
|
||||||
[connection signal="timeout" from="CharacterBody/Timer" to="CharacterBody/Timer" method="OnFireAtPlayer"]
|
|
||||||
|
|||||||
@@ -10,9 +10,8 @@ public partial class RangedEnemy : BasicEnemy
|
|||||||
{
|
{
|
||||||
var convertedPlayers = players.Select(x => (Node3D)x);
|
var convertedPlayers = players.Select(x => (Node3D)x);
|
||||||
var target = convertedPlayers.OrderBy(x => Position.DistanceTo(x.Position)).FirstOrDefault();
|
var target = convertedPlayers.OrderBy(x => Position.DistanceTo(x.Position)).FirstOrDefault();
|
||||||
var hitBox = GetNode<CharacterBody3D>("CharacterBody").GetChildren().OfType<Area3D>().Single();
|
LookAt(target.Position, Vector3.Up);
|
||||||
hitBox.LookAt(target.Position, Vector3.Up);
|
Rotation = new Vector3(0, Rotation.Y, Rotation.Z);
|
||||||
hitBox.Rotation = new Vector3(0, hitBox.Rotation.Y, hitBox.Rotation.Z);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
shader_type sky;
|
|
||||||
|
|
||||||
uniform vec3 color_top : source_color = vec3(0.91, 0.14, 1);
|
|
||||||
uniform vec3 color_horizon : source_color = vec3(1, 0.4, 0.42);
|
|
||||||
uniform vec3 color_bottom : source_color = vec3(1, 0.74, 0.39);
|
|
||||||
|
|
||||||
uniform float exponent_factor_top : hint_range(0, 100) = 1.0;
|
|
||||||
uniform float exponent_factor_bottom : hint_range(0, 100) = 1.0;
|
|
||||||
uniform float intensity_amp : hint_range(0, 1) = 1.0;
|
|
||||||
|
|
||||||
void sky() {
|
|
||||||
float p = EYEDIR.y;
|
|
||||||
float p1 = 1.0f - pow(min(1.0f, 1.0f - p), exponent_factor_top);
|
|
||||||
float p3 = 1.0f - pow(min(1.0f, 1.0f + p), exponent_factor_bottom);
|
|
||||||
float p2 = 1.0f - p1 - p3;
|
|
||||||
|
|
||||||
COLOR = (
|
|
||||||
color_top * p1 +
|
|
||||||
color_horizon * p2 +
|
|
||||||
color_bottom * p3
|
|
||||||
) * intensity_amp;
|
|
||||||
}
|
|
||||||
@@ -339,3 +339,7 @@ autoplay = "Animation"
|
|||||||
libraries = {
|
libraries = {
|
||||||
"": SubResource("AnimationLibrary_ohisj")
|
"": SubResource("AnimationLibrary_ohisj")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[node name="Camera3D" type="Camera3D" parent="."]
|
||||||
|
transform = Transform3D(-0.99952, 0, 0.0309922, 0.0209356, 0.737348, 0.675189, -0.022852, 0.675513, -0.736994, 0, 6.60737, -3.87573)
|
||||||
|
current = true
|
||||||
|
|||||||
@@ -88,6 +88,11 @@ public partial class Character : CharacterBody3D
|
|||||||
projectile.Position = Position;
|
projectile.Position = Position;
|
||||||
GetParent().AddChild(projectile);
|
GetParent().AddChild(projectile);
|
||||||
var projectiles = projectile.GetChildren().OfType<Projectile>();
|
var projectiles = projectile.GetChildren().OfType<Projectile>();
|
||||||
|
foreach (var proj in projectiles)
|
||||||
|
{
|
||||||
|
if (proj.HasRotation)
|
||||||
|
proj.Rotation = GetNode<Node3D>("Pivot").Rotation;
|
||||||
|
}
|
||||||
CanShoot = false;
|
CanShoot = false;
|
||||||
await ToSignal(GetTree().CreateTimer(projectiles.First().Cooldown), "timeout");
|
await ToSignal(GetTree().CreateTimer(projectiles.First().Cooldown), "timeout");
|
||||||
CanShoot = true;
|
CanShoot = true;
|
||||||
|
|||||||
@@ -32,15 +32,18 @@ public partial class Projectile : Node3D
|
|||||||
{
|
{
|
||||||
var pathFollow = GetNode<PathFollow3D>("PathFollow3D");
|
var pathFollow = GetNode<PathFollow3D>("PathFollow3D");
|
||||||
pathFollow.Progress += Speed * (float)delta;
|
pathFollow.Progress += Speed * (float)delta;
|
||||||
if (pathFollow.ProgressRatio > 0.9f)
|
if (pathFollow.ProgressRatio > 0.98f)
|
||||||
QueueFree();
|
QueueFree();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnProjectileHit(Node node)
|
public void OnProjectileHit(Node node)
|
||||||
{
|
{
|
||||||
SetProcess(false);
|
SetProcess(false);
|
||||||
if (node.GetParent() is BasicEnemy basicEnemy && basicEnemy.HasMethod(BasicEnemy.MethodName.OnEnemyHit))
|
if (node is BasicEnemy basicEnemy && basicEnemy.HasMethod(BasicEnemy.MethodName.OnEnemyHit))
|
||||||
|
{
|
||||||
basicEnemy.Call(BasicEnemy.MethodName.OnEnemyHit, node);
|
basicEnemy.Call(BasicEnemy.MethodName.OnEnemyHit, node);
|
||||||
|
GD.Print("Hit enemy at " + basicEnemy.Position);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
GD.Print("Hit something other than enemy: " + node.Name);
|
GD.Print("Hit something other than enemy: " + node.Name);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=8 format=3 uid="uid://5ce7ky4o0q2e"]
|
[gd_scene load_steps=9 format=3 uid="uid://5ce7ky4o0q2e"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://dha44dnvwhajo" path="res://Textures/Projectiles/Projectile_Capricorn.png" id="1_bvyt4"]
|
[ext_resource type="Texture2D" uid="uid://dha44dnvwhajo" path="res://Textures/Projectiles/Projectile_Capricorn.png" id="1_bvyt4"]
|
||||||
[ext_resource type="Script" path="res://Player/Base/Projectile.cs" id="1_ovnwu"]
|
[ext_resource type="Script" path="res://Player/Base/Projectile.cs" id="1_ovnwu"]
|
||||||
@@ -12,9 +12,9 @@ _data = {
|
|||||||
}
|
}
|
||||||
point_count = 2
|
point_count = 2
|
||||||
|
|
||||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_hebl4"]
|
[sub_resource type="CylinderShape3D" id="CylinderShape3D_u10le"]
|
||||||
height = 44.0041
|
height = 44.0
|
||||||
radius = 0.419241
|
radius = 0.3
|
||||||
|
|
||||||
[sub_resource type="Curve3D" id="Curve3D_ciqkc"]
|
[sub_resource type="Curve3D" id="Curve3D_ciqkc"]
|
||||||
_data = {
|
_data = {
|
||||||
@@ -23,10 +23,13 @@ _data = {
|
|||||||
}
|
}
|
||||||
point_count = 2
|
point_count = 2
|
||||||
|
|
||||||
[node name="CapricornAlt" type="Node3D"]
|
[sub_resource type="CylinderShape3D" id="CylinderShape3D_1gok4"]
|
||||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0, 0)
|
height = 44.0
|
||||||
|
radius = 0.3
|
||||||
|
|
||||||
[node name="Left Shot" type="Path3D" parent="."]
|
[node name="Capricorn Laser" type="Node3D"]
|
||||||
|
|
||||||
|
[node name="Forward Shot" type="Path3D" parent="." node_paths=PackedStringArray("_hitBox")]
|
||||||
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0.105376, 0.772365, 1.51984)
|
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0.105376, 0.772365, 1.51984)
|
||||||
top_level = true
|
top_level = true
|
||||||
curve = SubResource("Curve3D_bch55")
|
curve = SubResource("Curve3D_bch55")
|
||||||
@@ -35,34 +38,32 @@ Cooldown = 1.0
|
|||||||
_projectileSpeed = 5.0
|
_projectileSpeed = 5.0
|
||||||
_soundEffect = ExtResource("2_lofnw")
|
_soundEffect = ExtResource("2_lofnw")
|
||||||
_onHitSfx = ExtResource("3_h1ve3")
|
_onHitSfx = ExtResource("3_h1ve3")
|
||||||
|
_hitBox = NodePath("PathFollow3D/Hitbox")
|
||||||
|
|
||||||
[node name="PathFollow3D" type="PathFollow3D" parent="Left Shot"]
|
[node name="PathFollow3D" type="PathFollow3D" parent="Forward Shot"]
|
||||||
transform = Transform3D(0.999997, 0, -0.00207308, 0, 1, 0, 0.00207308, 0, 0.999997, -0.00347188, 1, 0.533723)
|
transform = Transform3D(0.999997, 0, -0.00207308, 0, 1, 0, 0.00207308, 0, 0.999997, -0.00347188, 1, 0.533723)
|
||||||
loop = false
|
loop = false
|
||||||
tilt_enabled = false
|
tilt_enabled = false
|
||||||
|
|
||||||
[node name="Hitbox" type="RigidBody3D" parent="Left Shot/PathFollow3D"]
|
[node name="Hitbox" type="RigidBody3D" parent="Forward Shot/PathFollow3D"]
|
||||||
transform = Transform3D(1, 0, -1.86265e-09, 0, 1, 0, 1.86265e-09, 0, 1, -0.00244793, 0.0059973, 0.293898)
|
collision_layer = 12
|
||||||
collision_layer = 4
|
|
||||||
collision_mask = 0
|
|
||||||
gravity_scale = 0.0
|
gravity_scale = 0.0
|
||||||
continuous_cd = true
|
continuous_cd = true
|
||||||
max_contacts_reported = 1
|
max_contacts_reported = 1
|
||||||
contact_monitor = true
|
contact_monitor = true
|
||||||
can_sleep = false
|
can_sleep = false
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Left Shot/PathFollow3D/Hitbox"]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Forward Shot/PathFollow3D/Hitbox"]
|
||||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
|
shape = SubResource("CylinderShape3D_u10le")
|
||||||
shape = SubResource("CylinderShape3D_hebl4")
|
|
||||||
|
|
||||||
[node name="Sprite3D2" type="Sprite3D" parent="Left Shot/PathFollow3D/Hitbox/CollisionShape3D"]
|
[node name="Sprite3D2" type="Sprite3D" parent="Forward Shot/PathFollow3D/Hitbox/CollisionShape3D"]
|
||||||
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -0.663415, 0, 0.752893)
|
transform = Transform3D(1, 0, 1.42109e-14, 0, 1, 0, -1.42109e-14, 0, 1, -0.32341, 0, 0.371708)
|
||||||
centered = false
|
centered = false
|
||||||
axis = 1
|
axis = 1
|
||||||
texture = ExtResource("1_bvyt4")
|
texture = ExtResource("1_bvyt4")
|
||||||
|
|
||||||
[node name="Backward Shot" type="Path3D" parent="."]
|
[node name="Backward Shot" type="Path3D" parent="." node_paths=PackedStringArray("_hitBox")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.098024, 0.772365, -2.01984)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.13167, 0.772365, -1.69199)
|
||||||
top_level = true
|
top_level = true
|
||||||
curve = SubResource("Curve3D_ciqkc")
|
curve = SubResource("Curve3D_ciqkc")
|
||||||
script = ExtResource("1_ovnwu")
|
script = ExtResource("1_ovnwu")
|
||||||
@@ -70,6 +71,7 @@ Cooldown = 1.0
|
|||||||
_projectileSpeed = 5.0
|
_projectileSpeed = 5.0
|
||||||
_soundEffect = ExtResource("2_lofnw")
|
_soundEffect = ExtResource("2_lofnw")
|
||||||
_onHitSfx = ExtResource("3_h1ve3")
|
_onHitSfx = ExtResource("3_h1ve3")
|
||||||
|
_hitBox = NodePath("PathFollow3D/Hitbox")
|
||||||
|
|
||||||
[node name="PathFollow3D" type="PathFollow3D" parent="Backward Shot"]
|
[node name="PathFollow3D" type="PathFollow3D" parent="Backward Shot"]
|
||||||
transform = Transform3D(0.999997, 0, -0.00207308, 0, 1, 0, 0.00207308, 0, 0.999997, -0.00347188, 1, 0.533723)
|
transform = Transform3D(0.999997, 0, -0.00207308, 0, 1, 0, 0.00207308, 0, 0.999997, -0.00347188, 1, 0.533723)
|
||||||
@@ -77,9 +79,7 @@ loop = false
|
|||||||
tilt_enabled = false
|
tilt_enabled = false
|
||||||
|
|
||||||
[node name="Hitbox" type="RigidBody3D" parent="Backward Shot/PathFollow3D"]
|
[node name="Hitbox" type="RigidBody3D" parent="Backward Shot/PathFollow3D"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.000400023, 0.00831366, 0.5)
|
collision_layer = 12
|
||||||
collision_layer = 4
|
|
||||||
collision_mask = 0
|
|
||||||
gravity_scale = 0.0
|
gravity_scale = 0.0
|
||||||
continuous_cd = true
|
continuous_cd = true
|
||||||
max_contacts_reported = 1
|
max_contacts_reported = 1
|
||||||
@@ -87,14 +87,13 @@ contact_monitor = true
|
|||||||
can_sleep = false
|
can_sleep = false
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Backward Shot/PathFollow3D/Hitbox"]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Backward Shot/PathFollow3D/Hitbox"]
|
||||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
|
shape = SubResource("CylinderShape3D_1gok4")
|
||||||
shape = SubResource("CylinderShape3D_hebl4")
|
|
||||||
|
|
||||||
[node name="Sprite3D2" type="Sprite3D" parent="Backward Shot/PathFollow3D/Hitbox"]
|
[node name="Sprite3D2" type="Sprite3D" parent="Backward Shot/PathFollow3D/Hitbox/CollisionShape3D"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.33, 0, 0.5)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.324293, 0, 0.3549)
|
||||||
centered = false
|
centered = false
|
||||||
axis = 1
|
axis = 1
|
||||||
texture = ExtResource("1_bvyt4")
|
texture = ExtResource("1_bvyt4")
|
||||||
|
|
||||||
[connection signal="body_entered" from="Left Shot/PathFollow3D/Hitbox" to="Left Shot" method="OnProjectileHit" flags=18]
|
[connection signal="body_entered" from="Forward Shot/PathFollow3D/Hitbox" to="Forward Shot" method="OnProjectileHit"]
|
||||||
[connection signal="body_entered" from="Backward Shot/PathFollow3D/Hitbox" to="Left Shot" method="OnProjectileHit" flags=18]
|
[connection signal="body_entered" from="Backward Shot/PathFollow3D/Hitbox" to="Backward Shot" method="OnProjectileHit"]
|
||||||
|
|||||||
@@ -1,102 +1,101 @@
|
|||||||
[gd_scene load_steps=8 format=3 uid="uid://cdsc35cj566q1"]
|
[gd_scene load_steps=9 format=3 uid="uid://cdsc35cj566q1"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://Player/Base/Projectile.cs" id="1_tbx8y"]
|
[ext_resource type="Script" path="res://Player/Base/Projectile.cs" id="1_tbx8y"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dha44dnvwhajo" path="res://Textures/Projectiles/Projectile_Capricorn.png" id="2_8osg4"]
|
[ext_resource type="Texture2D" uid="uid://dha44dnvwhajo" path="res://Textures/Projectiles/Projectile_Capricorn.png" id="2_8osg4"]
|
||||||
[ext_resource type="AudioStream" uid="uid://bykwwct1not4e" path="res://Audio/SFX/capricorn laeser.wav" id="2_jeoco"]
|
[ext_resource type="AudioStream" uid="uid://bykwwct1not4e" path="res://Audio/SFX/capricorn laeser.wav" id="2_jeoco"]
|
||||||
[ext_resource type="AudioStream" uid="uid://cat08h84wm5gm" path="res://Audio/SFX/ominous.wav" id="3_r2jj5"]
|
[ext_resource type="AudioStream" uid="uid://cat08h84wm5gm" path="res://Audio/SFX/ominous.wav" id="3_r2jj5"]
|
||||||
|
|
||||||
[sub_resource type="Curve3D" id="Curve3D_usgyk"]
|
[sub_resource type="Curve3D" id="Curve3D_bch55"]
|
||||||
_data = {
|
_data = {
|
||||||
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, -0.00347188, 1, 0.533723, 0, 0, 0, 0, 0, 0, 0.008, 1, -5),
|
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, -0.00347188, 1, 0.533723, 0, 0, 0, 0, 0, 0, 0.008, 1, -5),
|
||||||
"tilts": PackedFloat32Array(0, 0)
|
"tilts": PackedFloat32Array(0, 0)
|
||||||
}
|
}
|
||||||
point_count = 2
|
point_count = 2
|
||||||
|
|
||||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_hebl4"]
|
[sub_resource type="CylinderShape3D" id="CylinderShape3D_u10le"]
|
||||||
height = 44.0041
|
height = 44.0
|
||||||
radius = 0.419241
|
radius = 0.3
|
||||||
|
|
||||||
[sub_resource type="Curve3D" id="Curve3D_p2eme"]
|
[sub_resource type="Curve3D" id="Curve3D_ciqkc"]
|
||||||
_data = {
|
_data = {
|
||||||
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, -0.00347188, 1, 0.533723, 0, 0, 0, 0, 0, 0, 0.008, 1, -5),
|
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, -0.00347188, 1, 0.533723, 0, 0, 0, 0, 0, 0, 0.008, 1, -5),
|
||||||
"tilts": PackedFloat32Array(0, 0)
|
"tilts": PackedFloat32Array(0, 0)
|
||||||
}
|
}
|
||||||
point_count = 2
|
point_count = 2
|
||||||
|
|
||||||
[node name="CapricornLaser" type="Node3D"]
|
[sub_resource type="CylinderShape3D" id="CylinderShape3D_1gok4"]
|
||||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0, 0)
|
height = 44.0
|
||||||
|
radius = 0.3
|
||||||
|
|
||||||
[node name="Left Shot" type="Path3D" parent="." node_paths=PackedStringArray("_hitBox")]
|
[node name="Capricorn Laser Alt" type="Node3D"]
|
||||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -1.66814, 0.772365, -0.25)
|
|
||||||
|
[node name="Forward Shot" type="Path3D" parent="." node_paths=PackedStringArray("_hitBox")]
|
||||||
|
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -1.5, 1, 0)
|
||||||
top_level = true
|
top_level = true
|
||||||
curve = SubResource("Curve3D_usgyk")
|
curve = SubResource("Curve3D_bch55")
|
||||||
script = ExtResource("1_tbx8y")
|
script = ExtResource("1_tbx8y")
|
||||||
Cooldown = 1.0
|
Cooldown = 1.0
|
||||||
_projectileSpeed = 5.0
|
_projectileSpeed = 5.0
|
||||||
_soundEffect = ExtResource("2_jeoco")
|
_soundEffect = ExtResource("2_jeoco")
|
||||||
_onHitSfx = ExtResource("3_r2jj5")
|
_onHitSfx = ExtResource("3_r2jj5")
|
||||||
_hitBox = NodePath("PathFollow3D/Hitbox")
|
_hitBox = NodePath("PathFollow3D/HitBox")
|
||||||
|
|
||||||
[node name="PathFollow3D" type="PathFollow3D" parent="Left Shot"]
|
[node name="PathFollow3D" type="PathFollow3D" parent="Forward Shot"]
|
||||||
transform = Transform3D(0.999997, 0, -0.00207308, 0, 1, 0, 0.00207308, 0, 0.999997, -0.00347188, 1, 0.533723)
|
transform = Transform3D(0.999997, 0, -0.00207308, 0, 1, 0, 0.00207308, 0, 0.999997, -0.00347188, 1, 0.533723)
|
||||||
loop = false
|
loop = false
|
||||||
tilt_enabled = false
|
tilt_enabled = false
|
||||||
|
|
||||||
[node name="Hitbox" type="RigidBody3D" parent="Left Shot/PathFollow3D"]
|
[node name="HitBox" type="RigidBody3D" parent="Forward Shot/PathFollow3D"]
|
||||||
transform = Transform3D(1, 0, -1.86265e-09, 0, 1, 0, 1.86265e-09, 0, 1, -0.00244793, 0.0059973, 0.293898)
|
collision_layer = 12
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 0
|
|
||||||
gravity_scale = 0.0
|
gravity_scale = 0.0
|
||||||
continuous_cd = true
|
continuous_cd = true
|
||||||
max_contacts_reported = 1
|
max_contacts_reported = 1
|
||||||
contact_monitor = true
|
contact_monitor = true
|
||||||
can_sleep = false
|
can_sleep = false
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Left Shot/PathFollow3D/Hitbox"]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Forward Shot/PathFollow3D/HitBox"]
|
||||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
|
shape = SubResource("CylinderShape3D_u10le")
|
||||||
shape = SubResource("CylinderShape3D_hebl4")
|
|
||||||
|
|
||||||
[node name="Sprite3D2" type="Sprite3D" parent="Left Shot/PathFollow3D/Hitbox/CollisionShape3D"]
|
[node name="Sprite3D2" type="Sprite3D" parent="Forward Shot/PathFollow3D/HitBox/CollisionShape3D"]
|
||||||
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -0.663415, 0, 0.752893)
|
transform = Transform3D(1, 0, 1.42109e-14, 0, 1, 0, -1.42109e-14, 0, 1, -0.32341, 0, 0.371708)
|
||||||
centered = false
|
centered = false
|
||||||
axis = 1
|
axis = 1
|
||||||
texture = ExtResource("2_8osg4")
|
texture = ExtResource("2_8osg4")
|
||||||
|
|
||||||
[node name="Backward Shot" type="Path3D" parent="." node_paths=PackedStringArray("_hitBox")]
|
[node name="Backward Shot" type="Path3D" parent="." node_paths=PackedStringArray("_hitBox")]
|
||||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 1.87154, 0.772365, -0.25)
|
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 1.5, 1, 0)
|
||||||
top_level = true
|
top_level = true
|
||||||
curve = SubResource("Curve3D_p2eme")
|
curve = SubResource("Curve3D_ciqkc")
|
||||||
script = ExtResource("1_tbx8y")
|
script = ExtResource("1_tbx8y")
|
||||||
Cooldown = 1.0
|
Cooldown = 1.0
|
||||||
_projectileSpeed = 5.0
|
_projectileSpeed = 5.0
|
||||||
_soundEffect = ExtResource("2_jeoco")
|
_soundEffect = ExtResource("2_jeoco")
|
||||||
_onHitSfx = ExtResource("3_r2jj5")
|
_onHitSfx = ExtResource("3_r2jj5")
|
||||||
_hitBox = NodePath("../Left Shot/PathFollow3D/Hitbox")
|
_hitBox = NodePath("PathFollow3D/HitBox")
|
||||||
|
|
||||||
[node name="PathFollow3D" type="PathFollow3D" parent="Backward Shot"]
|
[node name="PathFollow3D" type="PathFollow3D" parent="Backward Shot"]
|
||||||
transform = Transform3D(0.999997, 0, -0.00207308, 0, 1, 0, 0.00207308, 0, 0.999997, -0.00347188, 1, 0.533723)
|
transform = Transform3D(0.999997, 0, -0.00207308, 0, 1, 0, 0.00207308, 0, 0.999997, -0.00347188, 1, 0.533723)
|
||||||
loop = false
|
loop = false
|
||||||
tilt_enabled = false
|
tilt_enabled = false
|
||||||
|
|
||||||
[node name="Hitbox" type="RigidBody3D" parent="Backward Shot/PathFollow3D"]
|
[node name="HitBox" type="RigidBody3D" parent="Backward Shot/PathFollow3D"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.000400023, 0.00831366, 0.5)
|
transform = Transform3D(0.999999, 0, 0.00207308, 0, 1, 0, -0.00207308, 0, 0.999999, 0.00236542, -1, -0.53373)
|
||||||
collision_layer = 0
|
collision_layer = 12
|
||||||
collision_mask = 0
|
|
||||||
gravity_scale = 0.0
|
gravity_scale = 0.0
|
||||||
continuous_cd = true
|
continuous_cd = true
|
||||||
max_contacts_reported = 1
|
max_contacts_reported = 1
|
||||||
contact_monitor = true
|
contact_monitor = true
|
||||||
can_sleep = false
|
can_sleep = false
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Backward Shot/PathFollow3D/Hitbox"]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Backward Shot/PathFollow3D/HitBox"]
|
||||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
|
transform = Transform3D(0.999997, 0, -0.00207308, 0, 1, 0, 0.00207308, 0, 0.999997, -0.00347188, 1, 0.533723)
|
||||||
shape = SubResource("CylinderShape3D_hebl4")
|
shape = SubResource("CylinderShape3D_1gok4")
|
||||||
|
|
||||||
[node name="Sprite3D2" type="Sprite3D" parent="Backward Shot/PathFollow3D/Hitbox"]
|
[node name="Sprite3D2" type="Sprite3D" parent="Backward Shot/PathFollow3D/HitBox/CollisionShape3D"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.33, 0, 0.5)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.324293, 0, 0.3549)
|
||||||
centered = false
|
centered = false
|
||||||
axis = 1
|
axis = 1
|
||||||
texture = ExtResource("2_8osg4")
|
texture = ExtResource("2_8osg4")
|
||||||
|
|
||||||
[connection signal="body_entered" from="Left Shot/PathFollow3D/Hitbox" to="Left Shot" method="OnProjectileHit"]
|
[connection signal="body_entered" from="Forward Shot/PathFollow3D/HitBox" to="Forward Shot" method="OnProjectileHit"]
|
||||||
[connection signal="body_entered" from="Backward Shot/PathFollow3D/Hitbox" to="Left Shot" method="OnProjectileHit"]
|
[connection signal="body_entered" from="Backward Shot/PathFollow3D/HitBox" to="Forward Shot" method="OnProjectileHit"]
|
||||||
|
|||||||
@@ -219,9 +219,9 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.408962, 0)
|
|||||||
collision_layer = 2
|
collision_layer = 2
|
||||||
motion_mode = 1
|
motion_mode = 1
|
||||||
script = ExtResource("1_aqn5t")
|
script = ExtResource("1_aqn5t")
|
||||||
_fireProjectile = ExtResource("3_wbhxk")
|
_fireProjectile = ExtResource("2_e6qos")
|
||||||
_altFireProjectile = ExtResource("2_e6qos")
|
_altFireProjectile = ExtResource("3_wbhxk")
|
||||||
_speed = 1.0
|
_speed = 1.5
|
||||||
|
|
||||||
[node name="Pivot" type="Node3D" parent="."]
|
[node name="Pivot" type="Node3D" parent="."]
|
||||||
|
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ public partial class CapricornControls : Character
|
|||||||
GetTree().Quit();
|
GetTree().Quit();
|
||||||
|
|
||||||
if (Input.IsActionJustPressed(OwnerPlayer.PlayerInput.Fire()) && CanShoot)
|
if (Input.IsActionJustPressed(OwnerPlayer.PlayerInput.Fire()) && CanShoot)
|
||||||
Fire(_fireProjectile);
|
Fire();
|
||||||
if (Input.IsActionJustPressed(OwnerPlayer.PlayerInput.AltFire()) && CanShoot)
|
if (Input.IsActionJustPressed(OwnerPlayer.PlayerInput.AltFire()) && CanShoot)
|
||||||
Fire(_altFireProjectile);
|
AltFire();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Vector3 CalculateCharacterMovement(double delta)
|
private Vector3 CalculateCharacterMovement(double delta)
|
||||||
@@ -81,13 +81,24 @@ public partial class CapricornControls : Character
|
|||||||
_sprite.Play("WalkBack");
|
_sprite.Play("WalkBack");
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void Fire(PackedScene projectileScene)
|
private async void Fire()
|
||||||
{
|
{
|
||||||
IsShooting = true;
|
IsShooting = true;
|
||||||
CanShoot = false;
|
CanShoot = false;
|
||||||
var projectile = projectileScene.Instantiate<Node3D>();
|
await ToSignal(GetTree().CreateTimer(1.0f), "timeout");
|
||||||
var projectileCooldown = projectile.GetChildren().OfType<Projectile>().First();
|
var projectile = _fireProjectile.Instantiate<Node3D>();
|
||||||
await ToSignal(GetTree().CreateTimer(projectileCooldown.Cooldown), "timeout");
|
projectile.Position = Position;
|
||||||
|
GetParent().AddChild(projectile);
|
||||||
|
CanShoot = true;
|
||||||
|
IsShooting = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void AltFire()
|
||||||
|
{
|
||||||
|
IsShooting = true;
|
||||||
|
CanShoot = false;
|
||||||
|
await ToSignal(GetTree().CreateTimer(1.0f), "timeout");
|
||||||
|
var projectile = _altFireProjectile.Instantiate<Node3D>();
|
||||||
projectile.Position = Position;
|
projectile.Position = Position;
|
||||||
GetParent().AddChild(projectile);
|
GetParent().AddChild(projectile);
|
||||||
CanShoot = true;
|
CanShoot = true;
|
||||||
|
|||||||
@@ -37,8 +37,7 @@ tilt_enabled = false
|
|||||||
|
|
||||||
[node name="Hitbox" type="RigidBody3D" parent="Center Shot/PathFollow3D"]
|
[node name="Hitbox" type="RigidBody3D" parent="Center Shot/PathFollow3D"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00512208, 0, 0.096)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00512208, 0, 0.096)
|
||||||
collision_layer = 4
|
collision_layer = 12
|
||||||
collision_mask = 0
|
|
||||||
gravity_scale = 0.0
|
gravity_scale = 0.0
|
||||||
continuous_cd = true
|
continuous_cd = true
|
||||||
max_contacts_reported = 1000
|
max_contacts_reported = 1000
|
||||||
@@ -71,8 +70,7 @@ tilt_enabled = false
|
|||||||
|
|
||||||
[node name="Hitbox" type="RigidBody3D" parent="Left Shot/PathFollow3D"]
|
[node name="Hitbox" type="RigidBody3D" parent="Left Shot/PathFollow3D"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.03827, 0, 0.0309103)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.03827, 0, 0.0309103)
|
||||||
collision_layer = 4
|
collision_layer = 12
|
||||||
collision_mask = 0
|
|
||||||
gravity_scale = 0.0
|
gravity_scale = 0.0
|
||||||
continuous_cd = true
|
continuous_cd = true
|
||||||
max_contacts_reported = 1000
|
max_contacts_reported = 1000
|
||||||
@@ -105,8 +103,7 @@ tilt_enabled = false
|
|||||||
|
|
||||||
[node name="Hitbox" type="RigidBody3D" parent="Right Shot/PathFollow3D"]
|
[node name="Hitbox" type="RigidBody3D" parent="Right Shot/PathFollow3D"]
|
||||||
transform = Transform3D(-1, 0, -0.00159994, 0, 1, 0, 0.00159994, 0, -1, -0.06, 0, 0.096)
|
transform = Transform3D(-1, 0, -0.00159994, 0, 1, 0, 0.00159994, 0, -1, -0.06, 0, 0.096)
|
||||||
collision_layer = 4
|
collision_layer = 12
|
||||||
collision_mask = 0
|
|
||||||
gravity_scale = 0.0
|
gravity_scale = 0.0
|
||||||
continuous_cd = true
|
continuous_cd = true
|
||||||
max_contacts_reported = 1000
|
max_contacts_reported = 1000
|
||||||
|
|||||||
@@ -35,8 +35,7 @@ loop = false
|
|||||||
tilt_enabled = false
|
tilt_enabled = false
|
||||||
|
|
||||||
[node name="Hitbox" type="RigidBody3D" parent="Center Shot/PathFollow3D"]
|
[node name="Hitbox" type="RigidBody3D" parent="Center Shot/PathFollow3D"]
|
||||||
collision_layer = 4
|
collision_layer = 12
|
||||||
collision_mask = 0
|
|
||||||
gravity_scale = 0.0
|
gravity_scale = 0.0
|
||||||
continuous_cd = true
|
continuous_cd = true
|
||||||
max_contacts_reported = 1
|
max_contacts_reported = 1
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
[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)
|
|
||||||
@@ -36,8 +36,7 @@ tilt_enabled = false
|
|||||||
|
|
||||||
[node name="Beam" type="RigidBody3D" parent="Path3D/PathFollow3D"]
|
[node name="Beam" type="RigidBody3D" parent="Path3D/PathFollow3D"]
|
||||||
transform = Transform3D(-1, 0, -8.74229e-08, 0, 1, 0, 8.74229e-08, 0, -1, 0, 0, 0)
|
transform = Transform3D(-1, 0, -8.74229e-08, 0, 1, 0, 8.74229e-08, 0, -1, 0, 0, 0)
|
||||||
collision_layer = 4
|
collision_layer = 12
|
||||||
collision_mask = 0
|
|
||||||
gravity_scale = 0.0
|
gravity_scale = 0.0
|
||||||
continuous_cd = true
|
continuous_cd = true
|
||||||
max_contacts_reported = 1000
|
max_contacts_reported = 1000
|
||||||
|
|||||||
@@ -35,8 +35,7 @@ tilt_enabled = false
|
|||||||
|
|
||||||
[node name="RigidBody3D" type="RigidBody3D" parent="Path3D/PathFollow3D"]
|
[node name="RigidBody3D" type="RigidBody3D" parent="Path3D/PathFollow3D"]
|
||||||
transform = Transform3D(1, 0, 2.98023e-08, 0, 1, 0, -2.98023e-08, 0, 1, 0, 0, 0)
|
transform = Transform3D(1, 0, 2.98023e-08, 0, 1, 0, -2.98023e-08, 0, 1, 0, 0, 0)
|
||||||
collision_layer = 4
|
collision_layer = 12
|
||||||
collision_mask = 0
|
|
||||||
gravity_scale = 0.0
|
gravity_scale = 0.0
|
||||||
continuous_cd = true
|
continuous_cd = true
|
||||||
max_contacts_reported = 100
|
max_contacts_reported = 100
|
||||||
|
|||||||
@@ -35,8 +35,7 @@ tilt_enabled = false
|
|||||||
|
|
||||||
[node name="RigidBody3D" type="RigidBody3D" parent="CutterShot/PathFollow3D"]
|
[node name="RigidBody3D" type="RigidBody3D" parent="CutterShot/PathFollow3D"]
|
||||||
transform = Transform3D(1, 0, -2.98023e-08, 0, 1, 0, 2.98023e-08, 0, 1, 0, 0, 0)
|
transform = Transform3D(1, 0, -2.98023e-08, 0, 1, 0, 2.98023e-08, 0, 1, 0, 0, 0)
|
||||||
collision_layer = 4
|
collision_layer = 12
|
||||||
collision_mask = 0
|
|
||||||
gravity_scale = 0.0
|
gravity_scale = 0.0
|
||||||
continuous_cd = true
|
continuous_cd = true
|
||||||
max_contacts_reported = 100
|
max_contacts_reported = 100
|
||||||
|
|||||||
@@ -124,7 +124,8 @@ p2_altfire={
|
|||||||
|
|
||||||
3d_physics/layer_1="LevelGeometry"
|
3d_physics/layer_1="LevelGeometry"
|
||||||
3d_physics/layer_2="EnemyProjectile"
|
3d_physics/layer_2="EnemyProjectile"
|
||||||
3d_physics/layer_3="BossHit"
|
3d_physics/layer_3="EnemyHit"
|
||||||
|
3d_physics/layer_4="BossHit"
|
||||||
3d_physics/layer_9="ProjectileToWalls"
|
3d_physics/layer_9="ProjectileToWalls"
|
||||||
|
|
||||||
[physics]
|
[physics]
|
||||||
|
|||||||
Reference in New Issue
Block a user