diff --git a/Enemies/Attacks/EnemyBullet.tscn b/Enemies/Attacks/EnemyBullet.tscn index 8b822f7..12914f8 100644 --- a/Enemies/Attacks/EnemyBullet.tscn +++ b/Enemies/Attacks/EnemyBullet.tscn @@ -6,7 +6,7 @@ [ext_resource type="AudioStream" uid="uid://cat08h84wm5gm" path="res://Audio/SFX/ominous.wav" id="3_ov77l"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_e4v7f"] -height = 8.99869 +height = 2.31583 radius = 0.154574 [node name="TestBullet" type="Node3D" node_paths=PackedStringArray("_hitBox")] @@ -18,7 +18,7 @@ _hitBox = NodePath("RigidBody3D") [node name="RigidBody3D" type="RigidBody3D" parent="."] collision_layer = 0 -collision_mask = 2 +collision_mask = 3 gravity_scale = 0.0 custom_integrator = true continuous_cd = true diff --git a/GameLogic/GameManager.cs b/GameLogic/GameManager.cs index 015ee40..cb2722d 100644 --- a/GameLogic/GameManager.cs +++ b/GameLogic/GameManager.cs @@ -142,7 +142,8 @@ public partial class GameManager : Node projectile.QueueFree(); var main = GetTree().Root.GetNode
("/root/Main"); - main.LoadNextLevel(_levelIndex++); + _levelIndex++; + main.LoadNextLevel(_levelIndex); foreach (var player in Players) EmitSignal(SignalName.ReselectCharacter, player); diff --git a/GameLogic/Main.cs b/GameLogic/Main.cs index f495943..bc24d01 100644 --- a/GameLogic/Main.cs +++ b/GameLogic/Main.cs @@ -15,7 +15,7 @@ public partial class Main : Node { var sceneToLoad = Levels.ElementAt(indexToLoad); CallDeferred(nameof(DeferredGoToScene), sceneToLoad); - + NumberOfPlayers = numberOfPlayers; var gameManager = GameManager.Instantiate(); @@ -40,21 +40,13 @@ public partial class Main : Node { var currentScene = Levels.ToList().ElementAt(currentSceneIndex); var nextScene = currentSceneIndex + 1; - CallDeferred(nameof(DeferredGoToScene), Levels.ElementAt(nextScene), currentScene); + CallDeferred(nameof(DeferredGoToScene), Levels.ElementAt(nextScene)); } } - private void DeferredGoToScene(PackedScene sceneToAdd) { - var nextScene = GD.Load(sceneToAdd.ResourcePath); - var newScene = nextScene.Instantiate(); - GetTree().Root.AddChild(newScene); - GetTree().Paused = true; - } - - private void DeferredGoToScene(PackedScene sceneToAdd, PackedScene sceneToRemove) - { - GetTree().GetFirstNodeInGroup("Level").QueueFree(); + if (GetTree().GetFirstNodeInGroup("Level") != null) + GetTree().GetFirstNodeInGroup("Level").QueueFree(); var nextScene = GD.Load(sceneToAdd.ResourcePath); var newScene = nextScene.Instantiate(); GetTree().Root.AddChild(newScene); diff --git a/GameLogic/Main.tscn b/GameLogic/Main.tscn index 348248c..76beee7 100644 --- a/GameLogic/Main.tscn +++ b/GameLogic/Main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=14 format=3 uid="uid://vwrw05ob2caq"] +[gd_scene load_steps=15 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"] @@ -14,6 +14,9 @@ [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"] +[sub_resource type="BoxShape3D" id="BoxShape3D_kph2u"] +size = Vector3(5, 20, 27.822) + [node name="Main" type="Node3D"] script = ExtResource("1_g4hua") Levels = Array[PackedScene]([ExtResource("2_jq3qe"), ExtResource("3_nhrqr"), ExtResource("2_0yhby"), ExtResource("5_xj47l"), ExtResource("6_xmedq"), ExtResource("7_58n7x"), ExtResource("8_pcp3p"), ExtResource("9_n1hja"), ExtResource("10_rs7ve"), ExtResource("11_o275c")]) @@ -28,3 +31,11 @@ max_polyphony = 10 [node name="Debug Camera" type="Camera3D" parent="."] transform = Transform3D(-1, 0, -8.74228e-08, -5.69087e-08, 0.759112, 0.65096, 6.63637e-08, 0.65096, -0.759112, 1.40462, 6.10678, -6.91273) visible = false + +[node name="StaticBody3D2" type="StaticBody3D" parent="."] +collision_layer = 2 +collision_mask = 0 + +[node name="CollisionShape3D4" type="CollisionShape3D" parent="StaticBody3D2"] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0, 6.58237) +shape = SubResource("BoxShape3D_kph2u") diff --git a/Levels/Scenes/Level2.tscn b/Levels/Scenes/Level2.tscn index 1e3fa87..349a0f7 100644 --- a/Levels/Scenes/Level2.tscn +++ b/Levels/Scenes/Level2.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=11 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"] @@ -21,6 +21,18 @@ size = Vector3(5, 20, 27.822) [sub_resource type="BoxShape3D" id="BoxShape3D_xtojv"] size = Vector3(5, 20, 27.822) +[sub_resource type="BoxShape3D" id="BoxShape3D_15sb2"] +size = Vector3(1, 1.0878, 0.909629) + +[sub_resource type="BoxShape3D" id="BoxShape3D_3fmyi"] +size = Vector3(1.01672, 1.53478, 5.31772) + +[sub_resource type="BoxShape3D" id="BoxShape3D_d3tdv"] +size = Vector3(1.01556, 1.80238, 7.12857) + +[sub_resource type="BoxShape3D" id="BoxShape3D_0w4r5"] +size = Vector3(2.51995, 1.80782, 1) + [node name="Level2" type="Node3D" groups=["Level"]] process_mode = 3 script = ExtResource("1_rkcp4") @@ -97,4 +109,20 @@ shape = SubResource("BoxShape3D_xkc5v") transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0, 9.03101) shape = SubResource("BoxShape3D_xtojv") +[node name="CollisionShape3D5" type="CollisionShape3D" parent="Collisions"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.510721, 0.196356, -3.73385) +shape = SubResource("BoxShape3D_15sb2") + +[node name="CollisionShape3D6" type="CollisionShape3D" parent="Collisions"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.539914, 0, 0.307289) +shape = SubResource("BoxShape3D_3fmyi") + +[node name="CollisionShape3D7" type="CollisionShape3D" parent="Collisions"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.11957, 0, -0.622127) +shape = SubResource("BoxShape3D_d3tdv") + +[node name="CollisionShape3D8" type="CollisionShape3D" parent="Collisions"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.26565, -0.141602, 2.921) +shape = SubResource("BoxShape3D_0w4r5") + [connection signal="body_entered" from="Area3D2" to="." method="OnExitEntered"] diff --git a/Levels/Scenes/Level3.tscn b/Levels/Scenes/Level3.tscn index f676829..f0da51a 100644 --- a/Levels/Scenes/Level3.tscn +++ b/Levels/Scenes/Level3.tscn @@ -599,7 +599,7 @@ shape = SubResource("BoxShape3D_yew2s") [node name="Door Hitbox" type="Area3D" parent="Door/StaticBody3D"] transform = Transform3D(1, -2.84217e-14, -1.27055e-21, 2.84217e-14, 1, 2.98023e-08, 4.26326e-14, 2.98023e-08, 1, 5.0822e-21, -1.19209e-07, -3.55271e-15) -collision_mask = 0 +collision_mask = 32 [node name="CollisionShape3D5" type="CollisionShape3D" parent="Door/StaticBody3D/Door Hitbox"] transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -0.571146, 0.810928, 0.294388) diff --git a/Player/Base/Character.cs b/Player/Base/Character.cs index 1b41b21..1589a82 100644 --- a/Player/Base/Character.cs +++ b/Player/Base/Character.cs @@ -68,7 +68,6 @@ public partial class Character : CharacterBody3D private async void Fire() { - GD.Print("Firing projectile at " + GlobalPosition); var projectile = _fireProjectile.Instantiate(); projectile.Position = Position; GetParent().AddChild(projectile); diff --git a/Player/Base/Projectile.cs b/Player/Base/Projectile.cs index c12d56f..4e348e3 100644 --- a/Player/Base/Projectile.cs +++ b/Player/Base/Projectile.cs @@ -30,7 +30,6 @@ public partial class Projectile : Node3D public override void _PhysicsProcess(double delta) { - GD.Print("Projectile is at " + GlobalPosition); var pathFollow = GetNode("PathFollow3D"); pathFollow.Progress += Speed * (float)delta; if (pathFollow.ProgressRatio > 0.98f) diff --git a/Player/Capricorn/Attacks/CapricornLaser.tscn b/Player/Capricorn/Attacks/CapricornLaser.tscn index d1d21e1..6ab103b 100644 --- a/Player/Capricorn/Attacks/CapricornLaser.tscn +++ b/Player/Capricorn/Attacks/CapricornLaser.tscn @@ -46,7 +46,7 @@ loop = false tilt_enabled = false [node name="Hitbox" type="RigidBody3D" parent="Forward Shot/PathFollow3D"] -collision_layer = 12 +collision_layer = 44 gravity_scale = 0.0 continuous_cd = true max_contacts_reported = 1 @@ -79,7 +79,7 @@ loop = false tilt_enabled = false [node name="Hitbox" type="RigidBody3D" parent="Backward Shot/PathFollow3D"] -collision_layer = 12 +collision_layer = 44 gravity_scale = 0.0 continuous_cd = true max_contacts_reported = 1 diff --git a/Player/Capricorn/Attacks/CapricornLaserAltFire.tscn b/Player/Capricorn/Attacks/CapricornLaserAltFire.tscn index d966b69..6c0249c 100644 --- a/Player/Capricorn/Attacks/CapricornLaserAltFire.tscn +++ b/Player/Capricorn/Attacks/CapricornLaserAltFire.tscn @@ -46,7 +46,7 @@ loop = false tilt_enabled = false [node name="HitBox" type="RigidBody3D" parent="Forward Shot/PathFollow3D"] -collision_layer = 12 +collision_layer = 44 gravity_scale = 0.0 continuous_cd = true max_contacts_reported = 1 @@ -80,7 +80,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 = 12 +collision_layer = 44 gravity_scale = 0.0 continuous_cd = true max_contacts_reported = 1 diff --git a/Player/Pisces/Attacks/ShotgunBullet.tscn b/Player/Pisces/Attacks/ShotgunBullet.tscn index b94ba0f..50585ad 100644 --- a/Player/Pisces/Attacks/ShotgunBullet.tscn +++ b/Player/Pisces/Attacks/ShotgunBullet.tscn @@ -37,7 +37,7 @@ tilt_enabled = false [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) -collision_layer = 12 +collision_layer = 44 gravity_scale = 0.0 continuous_cd = true max_contacts_reported = 1000 @@ -64,13 +64,13 @@ _onHitSfx = ExtResource("4_2g102") _hitBox = NodePath("PathFollow3D/Hitbox") [node name="PathFollow3D" type="PathFollow3D" parent="Left Shot"] -transform = Transform3D(0.999998, 0, -0.00159998, 0, 1, 0, 0.00159998, 0, 0.999998, 0, 0, 0) +transform = Transform3D(0.999998, 0, -0.0016, 0, 1, 0, 0.0016, 0, 0.999998, 0, 0, 0) loop = false tilt_enabled = false [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) -collision_layer = 12 +collision_layer = 44 gravity_scale = 0.0 continuous_cd = true max_contacts_reported = 1000 @@ -97,13 +97,13 @@ _onHitSfx = ExtResource("4_2g102") _hitBox = NodePath("PathFollow3D/Hitbox") [node name="PathFollow3D" type="PathFollow3D" parent="Right Shot"] -transform = Transform3D(0.999998, 0, -0.00159997, 0, 1, 0, 0.00159997, 0, 0.999998, 0, 0, 0) +transform = Transform3D(0.999998, 0, -0.0016, 0, 1, 0, 0.0016, 0, 0.999998, 0, 0, 0) loop = false tilt_enabled = false [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) -collision_layer = 12 +collision_layer = 44 gravity_scale = 0.0 continuous_cd = true max_contacts_reported = 1000 diff --git a/Player/Pisces/Attacks/Single.tscn b/Player/Pisces/Attacks/Single.tscn index 298f2df..1c9af24 100644 --- a/Player/Pisces/Attacks/Single.tscn +++ b/Player/Pisces/Attacks/Single.tscn @@ -36,7 +36,7 @@ tilt_enabled = false [node name="Hitbox" type="RigidBody3D" parent="Center Shot/PathFollow3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.92646, 0) -collision_layer = 12 +collision_layer = 44 gravity_scale = 0.0 continuous_cd = true max_contacts_reported = 1 diff --git a/Player/Sagittarius/Attacks/MegamiBeam.tscn b/Player/Sagittarius/Attacks/MegamiBeam.tscn index 0016603..9dfacc0 100644 --- a/Player/Sagittarius/Attacks/MegamiBeam.tscn +++ b/Player/Sagittarius/Attacks/MegamiBeam.tscn @@ -31,13 +31,13 @@ _hitBox = NodePath("PathFollow3D/Beam") HasRotation = true [node name="PathFollow3D" type="PathFollow3D" parent="Path3D"] -transform = Transform3D(0.999993, 0, 0, 0, 0.970138, -0.242535, 0, 0.242534, 0.970141, 0, 1, -1) +transform = Transform3D(0.999818, 0.00777275, 0.0169926, 4.65658e-10, 0.909374, -0.415969, -0.0186858, 0.415894, 0.909219, 0, 1, -1) loop = false tilt_enabled = false [node name="Beam" type="RigidBody3D" parent="Path3D/PathFollow3D"] transform = Transform3D(1, 0, 0, 0, -1, -1.50996e-07, 0, 1.50996e-07, -1, 0, 0, 0) -collision_layer = 12 +collision_layer = 44 collision_mask = 0 gravity_scale = 0.0 continuous_cd = true diff --git a/Player/Scorpio/Attacks/CutterShot.tscn b/Player/Scorpio/Attacks/CutterShot.tscn index 44fb5a2..932832a 100644 --- a/Player/Scorpio/Attacks/CutterShot.tscn +++ b/Player/Scorpio/Attacks/CutterShot.tscn @@ -14,6 +14,7 @@ point_count = 4 [sub_resource type="CylinderShape3D" id="CylinderShape3D_mgm2i"] height = 8.481 +radius = 0.304769 [node name="CutterShot" type="Node3D"] @@ -29,13 +30,13 @@ _onHitSfx = ExtResource("3_32sc2") _hitBox = NodePath("PathFollow3D/RigidBody3D") [node name="PathFollow3D" type="PathFollow3D" parent="Path3D"] -transform = Transform3D(0.95152, 0.00128604, -0.30758, 0, 0.999991, 0.00418112, 0.307583, -0.00397843, 0.951511, 0, 1, 0) +transform = Transform3D(0.95152, 0.00128605, -0.30758, 1.16415e-10, 0.999991, 0.00418113, 0.307582, -0.00397844, 0.951511, 0, 1, 0) loop = false tilt_enabled = false [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) -collision_layer = 12 +collision_layer = 44 gravity_scale = 0.0 continuous_cd = true max_contacts_reported = 100 diff --git a/Player/Scorpio/Attacks/CutterShotAltFire.tscn b/Player/Scorpio/Attacks/CutterShotAltFire.tscn index ec01d2f..1ba615c 100644 --- a/Player/Scorpio/Attacks/CutterShotAltFire.tscn +++ b/Player/Scorpio/Attacks/CutterShotAltFire.tscn @@ -14,6 +14,7 @@ point_count = 4 [sub_resource type="CylinderShape3D" id="CylinderShape3D_mgm2i"] height = 8.481 +radius = 0.272422 [node name="CutterAlt" type="Node3D"] @@ -29,13 +30,13 @@ _onHitSfx = ExtResource("3_v1t2f") _hitBox = NodePath("PathFollow3D/RigidBody3D") [node name="PathFollow3D" type="PathFollow3D" parent="CutterShot"] -transform = Transform3D(0.951515, -0.00127717, 0.307596, 1.16415e-10, 0.999991, 0.00415204, -0.307599, -0.00395073, 0.951506, 0, 1, 0) +transform = Transform3D(0.951515, -0.00127716, 0.307596, 1.16415e-10, 0.999991, 0.00415203, -0.307599, -0.00395073, 0.951506, 0, 1, 0) loop = false tilt_enabled = false [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) -collision_layer = 12 +collision_layer = 44 gravity_scale = 0.0 continuous_cd = true max_contacts_reported = 100 diff --git a/project.godot b/project.godot index 26b0f3d..08371f0 100644 --- a/project.godot +++ b/project.godot @@ -127,6 +127,8 @@ p2_altfire={ 3d_physics/layer_3="EnemyHit" 3d_physics/layer_4="BossHit" 3d_physics/layer_5="Area Exit" +3d_physics/layer_6="BreakableObstacle" +3d_physics/layer_7="Layer 7" 3d_physics/layer_9="ProjectileToWalls" [physics]