This commit is contained in:
2023-09-06 14:43:12 -07:00
parent f8cca640a6
commit d536aa2014
41 changed files with 2747 additions and 1011 deletions

View File

@@ -12,11 +12,20 @@ backface_collision = true
[node name="STAGE 2" instance=ExtResource("1_4808a")]
[node name="Plane" parent="." index="0"]
cast_shadow = 0
[node name="Cube" parent="." index="1"]
cast_shadow = 0
[node name="StaticBody3D" type="StaticBody3D" parent="Cube" index="0"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Cube/StaticBody3D" index="0"]
shape = SubResource("ConcavePolygonShape3D_sdbt6")
[node name="Cube002" parent="." index="2"]
cast_shadow = 0
[node name="StaticBody3D" type="StaticBody3D" parent="Cube002" index="0"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Cube002/StaticBody3D" index="0"]

View File

@@ -302,11 +302,13 @@ disabled = true
[node name="Plane" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0715971, 0)
cast_shadow = 0
mesh = SubResource("ArrayMesh_54w4i")
skeleton = NodePath("")
[node name="Cube" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 0.537041, -2.80098, 0.0936406, 0.666337)
cast_shadow = 0
mesh = SubResource("ArrayMesh_ae5pk")
skeleton = NodePath("")
@@ -317,6 +319,7 @@ shape = SubResource("ConcavePolygonShape3D_qdpti")
[node name="Cube001" type="MeshInstance3D" parent="."]
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, 0.537041, 1.75914, 0.0849344, 0.673152)
cast_shadow = 0
mesh = SubResource("ArrayMesh_6dg1r")
skeleton = NodePath("")
@@ -327,6 +330,7 @@ shape = SubResource("ConcavePolygonShape3D_cctvu")
[node name="Plane001" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.370022, 0)
cast_shadow = 0
mesh = SubResource("ArrayMesh_jwojp")
skeleton = NodePath("")

View File

@@ -519,7 +519,6 @@ _data = {
script = ExtResource("1_567jj")
[node name="Plane" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0966516, 0.350388, 0.0346987)
gi_mode = 0
mesh = SubResource("ArrayMesh_oq2t2")
skeleton = NodePath("")
@@ -531,36 +530,41 @@ shape = SubResource("ConcavePolygonShape3D_hhkle")
[node name="Text" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.350388, 1.21936)
cast_shadow = 0
gi_mode = 0
mesh = SubResource("ArrayMesh_bdh3p")
skeleton = NodePath("")
[node name="Text001" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.350388, 1.21936)
cast_shadow = 0
gi_mode = 0
mesh = SubResource("ArrayMesh_8n4r5")
skeleton = NodePath("")
[node name="Circle" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.350388, 1.21936)
cast_shadow = 0
gi_mode = 0
mesh = SubResource("ArrayMesh_5cfg8")
skeleton = NodePath("")
[node name="Plane001" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.378114, 1.21936)
gi_mode = 0
cast_shadow = 0
mesh = SubResource("ArrayMesh_p5f1g")
skeleton = NodePath("")
[node name="Plane002" type="MeshInstance3D" parent="."]
transform = Transform3D(0.690153, 0, 0, 0, 0.690153, 0, 0, 0, 0.690153, 4.10002, 1.94814, -4.92702)
cast_shadow = 0
gi_mode = 0
mesh = SubResource("ArrayMesh_rrpk8")
skeleton = NodePath("")
[node name="Plane003" type="MeshInstance3D" parent="."]
transform = Transform3D(0.746961, 0, 0, 0, 0.746961, 0, 0, 0, 0.746961, -4.28265, 1.92553, -4.92925)
cast_shadow = 0
gi_mode = 0
mesh = SubResource("ArrayMesh_bi5oe")
skeleton = NodePath("")

View File

@@ -26,6 +26,7 @@ _levelIndex = 1
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -2.51823)
shape = SubResource("CylinderShape3D_tux5n")
disabled = true
[node name="Collisions" type="Node3D" parent="."]

View File

@@ -16,14 +16,11 @@ public partial class AreaExit : Node3D
private void OnExitEntered(Node3D node)
{
if (node is Controls)
if (node.GetParent() is Player player)
{
if (node.GetType() == typeof(P1Controls) || node.GetType() == typeof(CapricornP1Controls))
_gameManager.RemoveCharacterAndAddToExit((P1Controls)node);
if (node.GetType() == typeof(P2Controls) || node.GetType() == typeof(CapricornP2Controls))
_gameManager.RemoveCharacterAndAddToExit((P2Controls)node);
_gameManager.RemoveCharacterAndAddToExit(player);
GD.Print("Exit reached");
GD.Print($"Exit reached by {player.Name}");
if (!_gameManager.Players.Any(x => x.CharactersLeftOnStage.Any()))
_gameManager.OnLevelClear();

View File

@@ -7,7 +7,7 @@ public partial class Level : Node3D
private List<BasicEnemy> _enemies;
private GameManager _gameManager;
public override void _Ready()
public override void _EnterTree()
{
_gameManager = GetTree().Root.GetNode<GameManager>("Main/GameManager");
_enemies = GetNode("Enemies").GetChildren().OfType<BasicEnemy>().ToList();