Compare commits

...

2 Commits

Author SHA1 Message Date
a5d36734ef Add attack patterns for boss 2023-09-11 20:01:18 -07:00
4d8fbda71b idk dude 2023-09-11 17:42:11 -07:00
44 changed files with 515 additions and 101 deletions

View File

@@ -1,23 +0,0 @@
using Godot;
public partial class EnemyBullet : Projectile
{
public override void _PhysicsProcess(double delta)
{
TranslateObjectLocal(new Vector3(0, 0, -Speed * (float)delta));
}
public new void OnProjectileHit(Node node)
{
SetPhysicsProcess(false);
if (node is Character character && character.HasMethod(Character.MethodName.OnHit))
{
GD.Print("Player hit: " + character.Name);
character.Call(Character.MethodName.OnHit, node);
}
QueueFree();
}
}

View File

@@ -1,23 +1,33 @@
[gd_scene load_steps=5 format=3 uid="uid://rlxnnw4yay7e"]
[ext_resource type="Script" path="res://Enemies/Attacks/EnemyBullet.cs" id="1_rv13r"]
[ext_resource type="Script" path="res://Player/Base/Projectile.cs" id="1_ex3g8"]
[ext_resource type="Texture2D" uid="uid://dd71tdgrgic46" path="res://Textures/Projectiles/LB ORB.png" id="2_6l2aj"]
[ext_resource type="AudioStream" uid="uid://cfj82os5p8i4p" path="res://Audio/SFX/shooting.wav" id="2_q6wdf"]
[sub_resource type="Curve3D" id="Curve3D_eve6n"]
_data = {
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, -3),
"tilts": PackedFloat32Array(0, 0)
}
point_count = 2
[sub_resource type="CylinderShape3D" id="CylinderShape3D_e4v7f"]
height = 2.31583
height = 15.359
radius = 0.154574
[node name="TestBullet" type="Node3D"]
script = ExtResource("1_rv13r")
Cooldown = 3.0
_soundEffect = ExtResource("2_q6wdf")
[node name="EnemyBullet" type="Path3D"]
curve = SubResource("Curve3D_eve6n")
script = ExtResource("1_ex3g8")
[node name="RigidBody3D" type="RigidBody3D" parent="."]
[node name="PathFollow3D" type="PathFollow3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
loop = false
tilt_enabled = false
[node name="RigidBody3D" type="RigidBody3D" parent="PathFollow3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
collision_layer = 0
collision_mask = 3
gravity_scale = 0.0
custom_integrator = true
continuous_cd = true
max_contacts_reported = 10
contact_monitor = true
@@ -26,19 +36,19 @@ lock_rotation = true
freeze = true
freeze_mode = 1
[node name="CollisionShape3D" type="CollisionShape3D" parent="RigidBody3D"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="PathFollow3D/RigidBody3D"]
transform = Transform3D(0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 0.0111055, 1.02602, 0)
shape = SubResource("CylinderShape3D_e4v7f")
[node name="Sprite3D" type="Sprite3D" parent="RigidBody3D/CollisionShape3D"]
[node name="Sprite3D" type="Sprite3D" parent="PathFollow3D/RigidBody3D/CollisionShape3D"]
transform = Transform3D(0.08, 0, 0, 0, 0.08, 0, 0, 0, 0.08, -0.390424, 0, 0.436329)
centered = false
axis = 1
texture = ExtResource("2_6l2aj")
[node name="TTL" type="Timer" parent="."]
[node name="TTL" type="Timer" parent="PathFollow3D"]
process_callback = 0
wait_time = 0.8
autostart = true
[connection signal="body_entered" from="RigidBody3D" to="." method="OnProjectileHit"]
[connection signal="body_entered" from="PathFollow3D/RigidBody3D" to="." method="OnPlayerHit"]

View File

@@ -19,7 +19,7 @@ public partial class FireAtPlayer : Timer
var target = convertedPlayers.OrderBy(x => _enemy.Position.DistanceTo(x.Position)).FirstOrDefault();
if (_enemy.Position.DistanceTo(target.Position) < _distanceToPlayer)
{
var projectile = _fireProjectile.Instantiate<Projectile>() as EnemyBullet;
var projectile = _fireProjectile.Instantiate<Projectile>();
projectile.Rotation = new Vector3(0, _enemy.Rotation.Y, 0);
projectile.Position = _enemy.Position;
AddChild(projectile);

View File

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

View File

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

View File

@@ -0,0 +1,46 @@
[gd_scene load_steps=5 format=3 uid="uid://cerac64r5jewa"]
[ext_resource type="Script" path="res://Player/Base/Projectile.cs" id="1_cveok"]
[ext_resource type="Texture2D" uid="uid://cpvq0rru8k7l5" path="res://Textures/Projectiles/Layer 3.png" id="1_p5wrg"]
[sub_resource type="Curve3D" id="Curve3D_h1xf0"]
_data = {
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 1, -1, 0, 0, 0, 0, 0, 0, 0, 1, -5, 0, 0, 0, 0, 0, 0, -2, 1, -1, 0, 0, 0, 0, 0, 0, 0, 1, 0),
"tilts": PackedFloat32Array(0, 0, 0, 0, 0)
}
point_count = 5
[sub_resource type="CylinderShape3D" id="CylinderShape3D_o3ugd"]
radius = 0.25
[node name="Orb Attack" type="Path3D"]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -3, 0, 1.5)
curve = SubResource("Curve3D_h1xf0")
script = ExtResource("1_cveok")
_projectileSpeed = 1.5
[node name="PathFollow3D" type="PathFollow3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
rotation_mode = 0
[node name="RigidBody3D" type="RigidBody3D" parent="PathFollow3D"]
transform = Transform3D(1, 0, 7.10543e-15, 0, 1, 0, -7.10543e-15, 0, 1, 0, 0, 0)
collision_layer = 0
collision_mask = 2
continuous_cd = true
max_contacts_reported = 5
contact_monitor = true
can_sleep = false
freeze = true
freeze_mode = 1
[node name="CollisionShape3D" type="CollisionShape3D" parent="PathFollow3D/RigidBody3D"]
transform = Transform3D(1, 0, 7.10543e-15, 0, 1, 0, -7.10543e-15, 0, 1, 0, 0, 0)
shape = SubResource("CylinderShape3D_o3ugd")
[node name="Sprite3D" type="Sprite3D" parent="PathFollow3D/RigidBody3D/CollisionShape3D"]
transform = Transform3D(0.25, 0, 0, 0, 0.25, 0, 0, 0, 0.25, 0, 0, 0)
axis = 1
texture = ExtResource("1_p5wrg")
[connection signal="body_entered" from="PathFollow3D/RigidBody3D" to="." method="OnPlayerHit"]

View File

@@ -1,9 +1,12 @@
[gd_scene load_steps=13 format=3 uid="uid://brbshysbgd47q"]
[gd_scene load_steps=16 format=3 uid="uid://brbshysbgd47q"]
[ext_resource type="Script" path="res://Enemies/Scripts/GodCircuit.cs" id="1_gyfww"]
[ext_resource type="Texture2D" uid="uid://b41ur7kyd8vdl" path="res://Levels/Models/Stage10/god circuit stage 1_image.png" id="2_2fhjk"]
[ext_resource type="Shader" path="res://Levels/Scenes/Door.gdshader" id="3_05w5o"]
[ext_resource type="AudioStream" uid="uid://crto2nljfvqnm" path="res://Audio/SFX/midboss hurt.wav" id="4_kc3iq"]
[ext_resource type="Script" path="res://Enemies/Attacks/GodCircuitAttacks/GodCircuitAttacks.cs" id="5_hp00m"]
[ext_resource type="PackedScene" uid="uid://uwia12i7yykb" path="res://Enemies/Attacks/GodCircuitAttacks/LaserAttack.tscn" id="6_frlsw"]
[ext_resource type="PackedScene" uid="uid://cerac64r5jewa" path="res://Enemies/Attacks/GodCircuitAttacks/OrbAttack.tscn" id="7_1t6n0"]
[sub_resource type="Animation" id="Animation_n85p2"]
resource_name = "OnHit"
@@ -172,7 +175,14 @@ freeze_mode = 1
transform = Transform3D(1, 0, 0, 0, 1, 0, 4.30333e-22, 0, 1, 0.317906, -0.678684, 1.59406)
shape = SubResource("BoxShape3D_n2erm")
[node name="Timer" type="Timer" parent="StaticBody3D"]
wait_time = 5.0
autostart = true
script = ExtResource("5_hp00m")
_attacks = Array[PackedScene]([ExtResource("7_1t6n0"), ExtResource("6_frlsw")])
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("4_kc3iq")
[connection signal="body_entered" from="StaticBody3D" to="." method="OnHit"]
[connection signal="timeout" from="StaticBody3D/Timer" to="StaticBody3D/Timer" method="OnTimeout"]

View File

@@ -1178,6 +1178,8 @@ _data = {
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.251952, 0)
collision_layer = 0
collision_mask = 69
axis_lock_angular_x = true
axis_lock_angular_z = true
gravity_scale = 0.0
max_contacts_reported = 20
contact_monitor = true

View File

@@ -6,7 +6,7 @@
[ext_resource type="PackedScene" uid="uid://b1j0g6ikmnibm" path="res://Enemies/HPComponent.tscn" id="4_1vt55"]
[sub_resource type="BoxShape3D" id="BoxShape3D_dm3u7"]
size = Vector3(0.721796, 2.37333, 0.564825)
size = Vector3(0.722, 1, 0.565)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_cr37n"]
resource_name = "Material.002"
@@ -895,6 +895,7 @@ shadow_mesh = SubResource("ArrayMesh_j7wsk")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.257979, 0)
collision_layer = 0
collision_mask = 69
gravity_scale = 0.0
max_contacts_reported = 20
contact_monitor = true
can_sleep = false
@@ -911,7 +912,7 @@ _fireProjectile = ExtResource("3_qenx3")
_distanceToPlayer = 5.0
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0714533, 0.795379, 0.0138905)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0714533, 0.929308, 0.0138905)
shape = SubResource("BoxShape3D_dm3u7")
[node name="ranged enemy" type="Node3D" parent="."]

View File

@@ -26,11 +26,11 @@ public partial class BasicEnemy : Node3D
public void OnPlayerHit(Node3D node)
{
GD.Print("Collision with player");
if (node is Character character && character.HasMethod(Character.MethodName.OnHit))
{
GD.Print("Collision with player at " + node.GlobalPosition + "by " + Name);
GD.Print("Player hit: " + character.Name);
character.Call(Character.MethodName.OnHit, node);
character.Call(Character.MethodName.OnHit, this);
}
}
}

View File

@@ -61,11 +61,11 @@ public partial class GameManager : Node
public void OnCharacterSelected(Player player)
{
player.SelectedCharacter = null;
var sfxPlayer = GetTree().Root.GetNode<AudioStreamPlayer>("Main/SFXPlayer");
var audioStream = ResourceLoader.Load<AudioStream>("Audio/SFX/Select.wav");
sfxPlayer.Stream = audioStream;
sfxPlayer.Play();
GD.Print("Instancing...");
GD.Print(player.Name);
if (player.CharactersLeftOnStage.Any())
{
@@ -77,6 +77,8 @@ public partial class GameManager : Node
public void RemoveCharacter(Player player)
{
ResetPlayerPosition(player);
player.CharactersLeftOnStage.Remove(player.SelectedCharacter);
if (player.SelectedCharacter is not null)
GetTree().Root.RemoveChild(player.SelectedCharacter);
@@ -96,6 +98,7 @@ public partial class GameManager : Node
public void RemoveCharacterAndAddToExit(Player player)
{
ResetPlayerPosition(player);
player.CharactersExited.Add(player.SelectedCharacter);
RemoveCharacter(player);
}
@@ -122,11 +125,17 @@ public partial class GameManager : Node
public void OnLevelClear()
{
var enemies = GetTree().GetNodesInGroup("Enemy").Where(x => !x.IsQueuedForDeletion());
foreach (var enemy in enemies)
enemy.QueueFree();
var playerCharacters = GetTree().GetNodesInGroup("Player");
EmitSignal(SignalName.ClearPlayerBG, 0);
EmitSignal(SignalName.ClearPlayerBG, 1);
foreach (var player in Players)
{
EmitSignal(SignalName.ClearPlayerBG, player.PlayerNumber);
player.CharactersLeftOnStage.AddRange(player.CharactersExited);
player.CharactersExited.Clear();
player.CharacterIndex = 0;

View File

@@ -1,16 +1,7 @@
[gd_scene load_steps=17 format=3 uid="uid://vwrw05ob2caq"]
[gd_scene load_steps=8 format=3 uid="uid://vwrw05ob2caq"]
[ext_resource type="Script" path="res://GameLogic/Main.cs" id="1_g4hua"]
[ext_resource type="PackedScene" uid="uid://btl5fdyjewnwc" path="res://Levels/Scenes/Level3.tscn" id="2_0yhby"]
[ext_resource type="PackedScene" uid="uid://dqv03pua4j8ga" path="res://Levels/Scenes/Level1.tscn" id="2_jq3qe"]
[ext_resource type="PackedScene" uid="uid://b12gq4yqc3d8i" path="res://UI/MainMenu.tscn" id="2_kvovw"]
[ext_resource type="PackedScene" uid="uid://basequfmpg04f" path="res://Levels/Scenes/Level2.tscn" id="3_nhrqr"]
[ext_resource type="PackedScene" uid="uid://ctvkevnc0wxka" path="res://Levels/Scenes/Level4.tscn" id="5_xj47l"]
[ext_resource type="PackedScene" uid="uid://col60npvg7wr1" path="res://Levels/Scenes/Level5.tscn" id="6_xmedq"]
[ext_resource type="PackedScene" uid="uid://8ukphol1isp2" path="res://Levels/Scenes/Level6.tscn" id="7_58n7x"]
[ext_resource type="PackedScene" uid="uid://bsq7edeueqyjg" path="res://Levels/Scenes/Level7.tscn" id="8_pcp3p"]
[ext_resource type="PackedScene" uid="uid://c4xcka4ekuur8" path="res://Levels/Scenes/Level8.tscn" id="9_n1hja"]
[ext_resource type="PackedScene" uid="uid://djwln4at4ho44" path="res://Levels/Scenes/Level9.tscn" id="10_rs7ve"]
[ext_resource type="PackedScene" uid="uid://0hdnmilwrsq6" path="res://Levels/Scenes/Level10.tscn" id="11_o275c"]
[ext_resource type="PackedScene" uid="uid://cxj6yeddshy16" path="res://GameLogic/GameManager.tscn" id="11_wiyvp"]
[ext_resource type="PackedScene" uid="uid://cvvjbka5nf52j" path="res://UI/SceneTransition.tscn" id="14_ai16y"]
@@ -23,7 +14,7 @@ font_color = Color(0, 1, 0, 1)
[node name="Main" type="Node3D" node_paths=PackedStringArray("_fpsCounter")]
script = ExtResource("1_g4hua")
Levels = Array[PackedScene]([ExtResource("2_jq3qe"), ExtResource("3_nhrqr"), ExtResource("2_0yhby"), ExtResource("5_xj47l"), ExtResource("7_58n7x"), ExtResource("6_xmedq"), ExtResource("8_pcp3p"), ExtResource("9_n1hja"), ExtResource("10_rs7ve"), ExtResource("11_o275c")])
Levels = Array[PackedScene]([ExtResource("11_o275c")])
GameManager = ExtResource("11_wiyvp")
_fpsCounter = NodePath("FPS Counter")

File diff suppressed because one or more lines are too long

View File

@@ -1,10 +1,11 @@
[gd_scene load_steps=15 format=3 uid="uid://0hdnmilwrsq6"]
[gd_scene load_steps=16 format=3 uid="uid://0hdnmilwrsq6"]
[ext_resource type="Script" path="res://Levels/Scripts/FinalLevel.cs" id="1_sy7dk"]
[ext_resource type="Script" path="res://Enemies/HealthbarProgress.cs" id="2_53ar2"]
[ext_resource type="PackedScene" uid="uid://brbshysbgd47q" path="res://Enemies/GodCircuit.tscn" id="4_vmhpd"]
[ext_resource type="Texture2D" uid="uid://ccnmmyvs53gni" path="res://Textures/Style_1.png" id="5_jjg8p"]
[ext_resource type="PackedScene" uid="uid://b0chkusc2bo2v" path="res://Levels/Models/Stage10/AnimatedFinal.tscn" id="6_8beqh"]
[ext_resource type="AudioStream" uid="uid://cat08h84wm5gm" path="res://Audio/SFX/ominous.wav" id="7_gnuti"]
[ext_resource type="PackedScene" uid="uid://b1j0g6ikmnibm" path="res://Enemies/HPComponent.tscn" id="7_nvq88"]
[sub_resource type="BoxShape3D" id="BoxShape3D_43mih"]
@@ -130,4 +131,8 @@ libraries = {
"": SubResource("AnimationLibrary_nvs18")
}
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="Boss GUI"]
stream = ExtResource("7_gnuti")
autoplay = true
[connection signal="OnEnemyBossHit" from="God Circuit" to="Boss GUI/TextureProgressBar" method="UpdateBar"]

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=14 format=3 uid="uid://basequfmpg04f"]
[gd_scene load_steps=15 format=3 uid="uid://basequfmpg04f"]
[ext_resource type="Script" path="res://Levels/Scripts/Level.cs" id="1_rkcp4"]
[ext_resource type="PackedScene" uid="uid://dvhuxo7h0opvm" path="res://Levels/Models/Stage2/stage_2Collisions.tscn" id="2_gsn0b"]
@@ -30,6 +30,9 @@ size = Vector3(1.01556, 1.80238, 7.12857)
[sub_resource type="BoxShape3D" id="BoxShape3D_0w4r5"]
size = Vector3(2.51995, 1.80782, 1)
[sub_resource type="BoxShape3D" id="BoxShape3D_ccgpo"]
size = Vector3(1.81712, 1.43756, 8.27492)
[node name="Level2" type="Node3D" groups=["Level"]]
process_mode = 3
script = ExtResource("1_rkcp4")
@@ -109,5 +112,9 @@ shape = SubResource("BoxShape3D_d3tdv")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.26565, -0.141602, 2.921)
shape = SubResource("BoxShape3D_0w4r5")
[node name="CollisionShape3D9" type="CollisionShape3D" parent="Collisions"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.96934, 0, -1.85493)
shape = SubResource("BoxShape3D_ccgpo")
[node name="Exit Portal" parent="." instance=ExtResource("2_sq8bv")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.39471, 0, 1.34009)

View File

@@ -504,10 +504,10 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.33444, 1.19194, -0.101275)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.68386, 1.19194, -0.150644)
[node name="RangedEnemy13" parent="Enemies" instance=ExtResource("5_8b1ug")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.12139, 1.18271, -0.117731)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.12139, 1.53982, -0.117731)
[node name="RangedEnemy14" parent="Enemies" instance=ExtResource("5_8b1ug")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.35562, 1.18271, -0.150644)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.35562, 1.58901, -0.150644)
[node name="RangedEnemy15" parent="Enemies" instance=ExtResource("5_8b1ug")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.35914, 0, -3.55883)
@@ -594,4 +594,10 @@ shape = SubResource("BoxShape3D_yew2s")
[node name="Exit Portal" parent="." instance=ExtResource("3_2t766")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.828453, -0.073884, -5.35807)
[node name="Marker3D" type="Marker3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.5, 0, 5.513)
[node name="Marker3D2" type="Marker3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, -10, -10)
[connection signal="body_entered" from="Door/StaticBody3D/Door Hitbox" to="Door" method="OnDoorHit"]

View File

@@ -17,6 +17,7 @@ public partial class AreaExit : Area3D
private void OnExitEntered(Node3D node)
{
var character = node as Character;
character.Position = new Vector3(0, 0, -20);
_gameManager.RemoveCharacterAndAddToExit(character.OwnerPlayer);
GD.Print($"Exit reached by {character.Name}");

View File

@@ -19,6 +19,7 @@ public partial class Character : CharacterBody3D
public override void _EnterTree()
{
Position = OwnerPlayer.SpawnPoint.Position;
CanShoot = true;
_gameManager = GetTree().Root.GetNode<GameManager>("Main/GameManager");
}
@@ -100,8 +101,7 @@ public partial class Character : CharacterBody3D
public void OnHit(Node3D node)
{
GD.Print($"Hit by {node.Name}");
if (this != null)
OwnerPlayer.SelectedCharacter.Position = new Vector3(0, 0, -20);
_gameManager.CallDeferred(GameManager.MethodName.RemoveCharacter, OwnerPlayer);
}
}

View File

@@ -1,5 +1,4 @@
using Godot;
using System;
public partial class Projectile : Node3D
{
@@ -37,6 +36,19 @@ public partial class Projectile : Node3D
Delete();
}
public void OnPlayerHit(Node node)
{
SetPhysicsProcess(false);
if (node is Character character && character.HasMethod(Character.MethodName.OnHit))
{
GD.Print("Player hit: " + character.Name);
character.Call(Character.MethodName.OnHit, this);
}
QueueFree();
}
public void Delete()
{
if (!isDeleted)

View File

@@ -2,7 +2,7 @@ using Godot;
public partial class SpawnPoint : Marker3D
{
public void SetPlayerPosition(Node3D character)
public void SetPlayerPosition(Character character)
{
GD.Print("Moving character to spawn point");
character.Position = Position;

View File

@@ -44,6 +44,7 @@ tilt_enabled = false
[node name="Hitbox" type="RigidBody3D" parent="Forward Shot/PathFollow3D"]
collision_layer = 44
collision_mask = 0
gravity_scale = 0.0
continuous_cd = true
max_contacts_reported = 1
@@ -75,6 +76,7 @@ tilt_enabled = false
[node name="Hitbox" type="RigidBody3D" parent="Backward Shot/PathFollow3D"]
collision_layer = 44
collision_mask = 0
gravity_scale = 0.0
continuous_cd = true
max_contacts_reported = 1

View File

@@ -44,6 +44,7 @@ tilt_enabled = false
[node name="HitBox" type="RigidBody3D" parent="Forward Shot/PathFollow3D"]
collision_layer = 44
collision_mask = 0
gravity_scale = 0.0
continuous_cd = true
max_contacts_reported = 1
@@ -76,6 +77,7 @@ tilt_enabled = false
[node name="HitBox" type="RigidBody3D" parent="Backward Shot/PathFollow3D"]
transform = Transform3D(0.999999, 0, 0.00207308, 0, 1, 0, -0.00207308, 0, 0.999999, 0.00236542, -1, -0.53373)
collision_layer = 44
collision_mask = 0
gravity_scale = 0.0
continuous_cd = true
max_contacts_reported = 1

View File

@@ -226,7 +226,7 @@ _speed = 1.5
[node name="Pivot" type="Node3D" parent="."]
[node name="Sprite" type="AnimatedSprite3D" parent="Pivot"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.51107, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.05046, 0)
billboard = 1
sprite_frames = SubResource("SpriteFrames_h2iud")
animation = &"WalkSide"

View File

@@ -8,6 +8,7 @@ public partial class CapricornControls : Character
public override void _Ready()
{
base._Ready();
Position = OwnerPlayer.SpawnPoint.Position;
_sprite = GetNode<AnimatedSprite3D>("Pivot/Sprite");
}
@@ -88,6 +89,7 @@ public partial class CapricornControls : Character
await ToSignal(GetTree().CreateTimer(1.0f), "timeout");
var projectile = _fireProjectile.Instantiate<Node3D>();
projectile.Position = Position;
if (GetParent() != null)
GetParent().AddChild(projectile);
CanShoot = true;
IsShooting = false;
@@ -100,6 +102,7 @@ public partial class CapricornControls : Character
await ToSignal(GetTree().CreateTimer(1.0f), "timeout");
var projectile = _altFireProjectile.Instantiate<Node3D>();
projectile.Position = Position;
if (GetParent() != null)
GetParent().AddChild(projectile);
CanShoot = true;
IsShooting = false;
@@ -130,7 +133,6 @@ public partial class CapricornControls : Character
public new void OnHit(Node3D node)
{
if (this != null)
_gameManager.CallDeferred(GameManager.MethodName.RemoveCharacter, OwnerPlayer);
}
}

View File

@@ -6,7 +6,7 @@
[sub_resource type="Curve3D" id="Curve3D_7ok4f"]
_data = {
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, -0.0755615, 2.8497, -5.04305, 0, 0, 0, 0, 0, 0, 0, 1, -10),
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, 0, 0, 1, -5),
"tilts": PackedFloat32Array(0, 0, 0)
}
point_count = 3
@@ -28,7 +28,8 @@ _projectileSpeed = 3.0
HasRotation = true
[node name="PathFollow3D" type="PathFollow3D" parent="Path3D"]
transform = Transform3D(0.999818, 0.00777275, 0.0169926, 4.65658e-10, 0.909374, -0.415969, -0.0186858, 0.415894, 0.909219, 0, 1, -1)
transform = Transform3D(0.999993, 0, 0, 0, 0.999995, 0, 0, 0, 0.999999, 0, 1, -1)
rotation_mode = 0
loop = false
tilt_enabled = false

View File

@@ -6,7 +6,7 @@
[sub_resource type="Curve3D" id="Curve3D_i1cv2"]
_data = {
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0.889019, 0.987915, -2.75022, 0, 0, 0, 0, 0, 0, 0.595381, 0.990112, -4.18814, 0, 0, 0, 0, 0, 0, -1.2854, 0.993652, -4.79623),
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0.548, 1, -1.274, 0, 0, 0, 0, 0, 0, 0.389, 1, -2.248, 0, 0, 0, 0, 0, 0, -0.28, 1, -2.846),
"tilts": PackedFloat32Array(0, 0, 0, 0)
}
point_count = 4
@@ -27,7 +27,7 @@ _soundEffect = ExtResource("2_u4aoe")
_projectileSpeed = 4.0
[node name="PathFollow3D" type="PathFollow3D" parent="Path3D"]
transform = Transform3D(0.95152, 0.00128605, -0.30758, 1.16415e-10, 0.999991, 0.00418113, 0.307582, -0.00397844, 0.951511, 0, 1, 0)
transform = Transform3D(0.918621, 0, -0.395136, 0, 1, 0, 0.395137, 0, 0.91862, 0, 1, 0)
loop = false
tilt_enabled = false

View File

@@ -4,9 +4,9 @@
[ext_resource type="Texture2D" uid="uid://cdryxdasvun4r" path="res://Textures/Projectiles/Projectile_Scorpio.png" id="2_6mabu"]
[ext_resource type="AudioStream" uid="uid://ce40y3hln3twm" path="res://Audio/SFX/grass cutter.wav" id="2_qmvk7"]
[sub_resource type="Curve3D" id="Curve3D_ocip8"]
[sub_resource type="Curve3D" id="Curve3D_h0dr3"]
_data = {
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -0.889, 0.988, -2.75, 0, 0, 0, 0, 0, 0, -0.595, 0.99, -4.188, 0, 0, 0, 0, 0, 0, 1.285, 0.994, -4.796),
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -0.548, 1, -1.274, 0, 0, 0, 0, 0, 0, -0.389, 1, -2.248, 0, 0, 0, 0, 0, 0, 0.28, 1, -2.846),
"tilts": PackedFloat32Array(0, 0, 0, 0)
}
point_count = 4
@@ -19,7 +19,7 @@ radius = 0.272422
[node name="CutterShot" type="Path3D" parent="." node_paths=PackedStringArray("_sprite")]
top_level = true
curve = SubResource("Curve3D_ocip8")
curve = SubResource("Curve3D_h0dr3")
script = ExtResource("1_7xtlh")
_sprite = NodePath("PathFollow3D/RigidBody3D/CollisionShape3D/Sprite3D")
Cooldown = 0.7
@@ -27,7 +27,7 @@ _soundEffect = ExtResource("2_qmvk7")
_projectileSpeed = 4.0
[node name="PathFollow3D" type="PathFollow3D" parent="CutterShot"]
transform = Transform3D(0.951515, -0.00127716, 0.307596, 1.16415e-10, 0.999991, 0.00415203, -0.307599, -0.00395073, 0.951506, 0, 1, 0)
transform = Transform3D(0.918621, 0, 0.395136, 0, 1, 0, -0.395137, 0, 0.91862, 0, 1, 0)
loop = false
tilt_enabled = false

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cwnia3figwdja"
path="res://.godot/imported/pexels-photo-2117937.jpeg-8dcbc413ed552baa603c4a4eec71b800.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Textures/GUI/pexels-photo-2117937.jpeg"
dest_files=["res://.godot/imported/pexels-photo-2117937.jpeg-8dcbc413ed552baa603c4a4eec71b800.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://531b68bg4tn6"
path="res://.godot/imported/Layer 1.png-434c09112f0431aeae546d2abc201715.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Textures/Projectiles/Layer 1.png"
dest_files=["res://.godot/imported/Layer 1.png-434c09112f0431aeae546d2abc201715.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bunon01jmxhbx"
path="res://.godot/imported/Layer 2.png-c7b58dfa7699c6015700761c51fd62c2.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Textures/Projectiles/Layer 2.png"
dest_files=["res://.godot/imported/Layer 2.png-c7b58dfa7699c6015700761c51fd62c2.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

View File

@@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cpvq0rru8k7l5"
path.s3tc="res://.godot/imported/Layer 3.png-8c67b1c0a9d0c73ac3b99d99fbd80aab.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://Textures/Projectiles/Layer 3.png"
dest_files=["res://.godot/imported/Layer 3.png-8c67b1c0a9d0c73ac3b99d99fbd80aab.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://x8f4g1rccvud"
path="res://.godot/imported/Layer 4.png-4be2d4c0ade96d592115d1beb2b45b1f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Textures/Projectiles/Layer 4.png"
dest_files=["res://.godot/imported/Layer 4.png-4be2d4c0ade96d592115d1beb2b45b1f.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dopabx0w1pd3x"
path="res://.godot/imported/Layer 5.png-abc20d07da39ebe1fc7b31d848721990.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Textures/Projectiles/Layer 5.png"
dest_files=["res://.godot/imported/Layer 5.png-abc20d07da39ebe1fc7b31d848721990.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bfx6i5jow7psm"
path="res://.godot/imported/Layer 6.png-07779a504ae11e88181be6c43ccf7f99.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Textures/Projectiles/Layer 6.png"
dest_files=["res://.godot/imported/Layer 6.png-07779a504ae11e88181be6c43ccf7f99.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

@@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://blhihtd4vmbrg"
path.s3tc="res://.godot/imported/Layer 7.png-ffe4c3eb1da46d9c12055e1b9bef4aa5.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://Textures/Projectiles/Layer 7.png"
dest_files=["res://.godot/imported/Layer 7.png-ffe4c3eb1da46d9c12055e1b9bef4aa5.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

3
UI/LevelClearScreen.tscn Normal file
View File

@@ -0,0 +1,3 @@
[gd_scene format=3 uid="uid://crbbtuip4wn0r"]
[node name="LevelClearScreen" type="Node2D"]