diff --git a/GameJam2023.csproj b/GameJam2023.csproj
index c5d4913..3134c7a 100644
--- a/GameJam2023.csproj
+++ b/GameJam2023.csproj
@@ -5,6 +5,7 @@
+
\ No newline at end of file
diff --git a/Scenes/Characters/Capricorn/CapricornP1.tscn b/Scenes/Characters/Capricorn/CapricornP1.tscn
index 74637f9..2365a44 100644
--- a/Scenes/Characters/Capricorn/CapricornP1.tscn
+++ b/Scenes/Characters/Capricorn/CapricornP1.tscn
@@ -1,8 +1,10 @@
-[gd_scene load_steps=34 format=3 uid="uid://crkon4c8ah1a2"]
+[gd_scene load_steps=36 format=3 uid="uid://crkon4c8ah1a2"]
[ext_resource type="Texture2D" uid="uid://utm2g5q7m2b3" path="res://Scenes/Characters/Capricorn/GameJam_DevilCapricorn_WalkForward.png" id="1_6gj6x"]
[ext_resource type="Script" path="res://Scripts/Capricorn.cs" id="1_rngpf"]
+[ext_resource type="PackedScene" uid="uid://5ce7ky4o0q2e" path="res://Scenes/Weapons/CapricornLaser.tscn" id="2_6v8va"]
[ext_resource type="Texture2D" uid="uid://c5t256wcykb47" path="res://Scenes/Characters/Capricorn/GameJam_DevilCapricorn_WalkSide.png" id="2_7kuua"]
+[ext_resource type="PackedScene" uid="uid://cdsc35cj566q1" path="res://Scenes/Weapons/CapricornLaserAltFire.tscn" id="3_0im4a"]
[ext_resource type="Texture2D" uid="uid://w444vcu8rvae" path="res://Scenes/Characters/Capricorn/GameJam_DevilCapricorn_WalkBehind.png" id="3_jo3tm"]
[ext_resource type="Texture2D" uid="uid://cju5ycxiuwy25" path="res://Scenes/Characters/Capricorn/GameJam_DevilCapricorn_AttackSide.png" id="4_o173h"]
[ext_resource type="Texture2D" uid="uid://s0j0kj4ila8s" path="res://Scenes/Characters/Capricorn/GameJam_DevilCapricorn_AttackForward.png" id="5_gjitx"]
@@ -215,6 +217,12 @@ size = Vector3(1, 5, 1)
[node name="CapricornP1" type="CharacterBody3D" groups=["Player"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0)
script = ExtResource("1_rngpf")
+_fireProjectile = ExtResource("2_6v8va")
+_altFireProjectile = ExtResource("3_0im4a")
+_speed = 1.0
+_fireProjectile = ExtResource("2_6v8va")
+_altFireProjectile = ExtResource("3_0im4a")
+_speed = 1.0
[node name="Pivot" type="Node3D" parent="."]
diff --git a/Scenes/Weapons/CapricornLaser.tscn b/Scenes/Weapons/CapricornLaser.tscn
new file mode 100644
index 0000000..f63b285
--- /dev/null
+++ b/Scenes/Weapons/CapricornLaser.tscn
@@ -0,0 +1,51 @@
+[gd_scene load_steps=4 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="Script" path="res://Scripts/CapricornLaserShot.cs" id="1_nkyy8"]
+
+[sub_resource type="CylinderShape3D" id="CylinderShape3D_bnunv"]
+radius = 0.419241
+
+[node name="CapricornLaser" type="Node3D"]
+script = ExtResource("1_nkyy8")
+_projectileSpeed = 1.5
+
+[node name="Forward Shot" type="RigidBody3D" parent="."]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.5)
+collision_layer = 34
+collision_mask = 34
+gravity_scale = 0.0
+continuous_cd = true
+max_contacts_reported = 1000
+contact_monitor = true
+can_sleep = false
+
+[node name="CollisionShape3D" type="CollisionShape3D" parent="Forward Shot"]
+transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
+shape = SubResource("CylinderShape3D_bnunv")
+
+[node name="Sprite3D2" type="Sprite3D" parent="Forward Shot"]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.33, 0, 0.5)
+centered = false
+axis = 1
+texture = ExtResource("1_bvyt4")
+
+[node name="BackwardShot" type="RigidBody3D" parent="."]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0.5)
+collision_layer = 34
+collision_mask = 34
+gravity_scale = 0.0
+continuous_cd = true
+max_contacts_reported = 1000
+contact_monitor = true
+can_sleep = false
+
+[node name="CollisionShape3D" type="CollisionShape3D" parent="BackwardShot"]
+transform = Transform3D(-0.5, 0, -4.37114e-08, 0, 0.5, 0, 4.37114e-08, 0, -0.5, 0, -0.5, 0.5)
+shape = SubResource("CylinderShape3D_bnunv")
+
+[node name="Sprite3D2" type="Sprite3D" parent="BackwardShot/CollisionShape3D"]
+transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -0.66, 0, 0.965768)
+centered = false
+axis = 1
+texture = ExtResource("1_bvyt4")
diff --git a/Scenes/Weapons/CapricornLaserAltFire.tscn b/Scenes/Weapons/CapricornLaserAltFire.tscn
new file mode 100644
index 0000000..223d8cb
--- /dev/null
+++ b/Scenes/Weapons/CapricornLaserAltFire.tscn
@@ -0,0 +1,52 @@
+[gd_scene load_steps=4 format=3 uid="uid://cdsc35cj566q1"]
+
+[ext_resource type="Script" path="res://Scripts/CapricornLaserShot.cs" id="1_8lywi"]
+[ext_resource type="Texture2D" uid="uid://dha44dnvwhajo" path="res://Textures/Projectiles/Projectile_Capricorn.png" id="2_8osg4"]
+
+[sub_resource type="CylinderShape3D" id="CylinderShape3D_bnunv"]
+radius = 0.419241
+
+[node name="CapricornLaser" type="Node3D"]
+transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -0.242816, 0, 0)
+script = ExtResource("1_8lywi")
+_projectileSpeed = 1.5
+
+[node name="Forward Shot" type="RigidBody3D" parent="."]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.5)
+collision_layer = 34
+collision_mask = 34
+gravity_scale = 0.0
+continuous_cd = true
+max_contacts_reported = 1000
+contact_monitor = true
+can_sleep = false
+
+[node name="CollisionShape3D" type="CollisionShape3D" parent="Forward Shot"]
+transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
+shape = SubResource("CylinderShape3D_bnunv")
+
+[node name="Sprite3D2" type="Sprite3D" parent="Forward Shot"]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.33, 0, 0.5)
+centered = false
+axis = 1
+texture = ExtResource("2_8osg4")
+
+[node name="BackwardShot" type="RigidBody3D" parent="."]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0.5)
+collision_layer = 34
+collision_mask = 34
+gravity_scale = 0.0
+continuous_cd = true
+max_contacts_reported = 1000
+contact_monitor = true
+can_sleep = false
+
+[node name="CollisionShape3D" type="CollisionShape3D" parent="BackwardShot"]
+transform = Transform3D(-0.5, 0, -4.37114e-08, 0, 0.5, 0, 4.37114e-08, 0, -0.5, 0, -0.5, 0.5)
+shape = SubResource("CylinderShape3D_bnunv")
+
+[node name="Sprite3D2" type="Sprite3D" parent="BackwardShot/CollisionShape3D"]
+transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, -0.66, 0, 0.965768)
+centered = false
+axis = 1
+texture = ExtResource("2_8osg4")
diff --git a/Scenes/Weapons/ShotgunBullet.tscn b/Scenes/Weapons/ShotgunBullet.tscn
index bbea4dd..3763532 100644
--- a/Scenes/Weapons/ShotgunBullet.tscn
+++ b/Scenes/Weapons/ShotgunBullet.tscn
@@ -33,7 +33,6 @@ transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
shape = SubResource("CylinderShape3D_eme14")
[node name="Sprite3D" type="Sprite3D" parent="RigidBody3D/CollisionShape3D"]
-transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
axis = 1
texture = ExtResource("2_a612r")
@@ -52,7 +51,6 @@ transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
shape = SubResource("CylinderShape3D_752q2")
[node name="Sprite3D" type="Sprite3D" parent="RigidBody3D2/CollisionShape3D"]
-transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
axis = 1
texture = ExtResource("2_a612r")
diff --git a/Scenes/Weapons/Single.tscn b/Scenes/Weapons/Single.tscn
index 57f008e..989289c 100644
--- a/Scenes/Weapons/Single.tscn
+++ b/Scenes/Weapons/Single.tscn
@@ -12,8 +12,8 @@ Cooldown = 0.3
_projectileSpeed = 10.0
[node name="RigidBody3D" type="RigidBody3D" parent="."]
-collision_layer = 2
-collision_mask = 0
+collision_layer = 34
+collision_mask = 34
gravity_scale = 0.0
continuous_cd = true
max_contacts_reported = 1000
diff --git a/Scripts/Capricorn.cs b/Scripts/Capricorn.cs
index a94aaa7..ec7fc65 100644
--- a/Scripts/Capricorn.cs
+++ b/Scripts/Capricorn.cs
@@ -96,11 +96,11 @@ public partial class Capricorn : Character1
private async void Fire()
{
IsShooting = true;
- //var projectile = _fireProjectile.Instantiate();
- //projectile.Position = Position + new Vector3(0f, 1f, 0f);
- //GetParent().AddChild(projectile);
CanShoot = false;
- await ToSignal(GetTree().CreateTimer(2.0f), "timeout");
+ await ToSignal(GetTree().CreateTimer(0.8f), "timeout");
+ var projectile = _fireProjectile.Instantiate();
+ projectile.Position = Position + new Vector3(0f, 1f, 0f);
+ GetParent().AddChild(projectile);
CanShoot = true;
IsShooting = false;
}
@@ -108,11 +108,11 @@ public partial class Capricorn : Character1
private async void AltFire()
{
IsShooting = true;
- //var projectile = _altFireProjectile.Instantiate();
- //projectile.Position = Position + new Vector3(0f, 1f, 0f);
- //GetParent().AddChild(projectile);
CanShoot = false;
- await ToSignal(GetTree().CreateTimer(2.0f), "timeout");
+ await ToSignal(GetTree().CreateTimer(0.8f), "timeout");
+ var projectile = _altFireProjectile.Instantiate();
+ projectile.Position = Position + new Vector3(0f, 1f, 0f);
+ GetParent().AddChild(projectile);
CanShoot = true;
IsShooting = false;
}
diff --git a/Scripts/CapricornLaserShot.cs b/Scripts/CapricornLaserShot.cs
new file mode 100644
index 0000000..15215cb
--- /dev/null
+++ b/Scripts/CapricornLaserShot.cs
@@ -0,0 +1,12 @@
+using Godot;
+using System.Linq;
+
+public partial class CapricornLaserShot : Projectile
+{
+ public override void _PhysicsProcess(double delta)
+ {
+ var shots = GetChildren().OfType();
+ shots.ElementAt(0).Translate(new Vector3(0, 0, Speed * -(float)delta));
+ shots.ElementAt(1).Translate(new Vector3(0, 0, Speed * (float)delta));
+ }
+}
diff --git a/Scripts/GameManager.cs b/Scripts/GameManager.cs
index ebf1a29..ed99af8 100644
--- a/Scripts/GameManager.cs
+++ b/Scripts/GameManager.cs
@@ -161,8 +161,11 @@ public partial class GameManager : Node
foreach (var player in players)
GetTree().Root.RemoveChild(player);
- var main = GetTree().Root.GetNode("/root/Main");
+ var projectiles = GetTree().Root.GetChildren().OfType();
+ foreach (var projectile in projectiles)
+ GetTree().Root.RemoveChild(projectile);
+ var main = GetTree().Root.GetNode("/root/Main");
main.LoadNextLevel(_levelIndex++);
foreach (var player in Players)
diff --git a/Scripts/StageGUI.cs b/Scripts/StageGUI.cs
index f15d44a..d044196 100644
--- a/Scripts/StageGUI.cs
+++ b/Scripts/StageGUI.cs
@@ -36,6 +36,7 @@ public partial class StageGUI : Control
return;
player.IsSelectingCharacter = true;
+ ChangeBG(player);
}
public override void _Process(double delta)
diff --git a/Textures/Projectiles/Projectile_Capricorn.png.import b/Textures/Projectiles/Projectile_Capricorn.png.import
index a21eb9e..951c909 100644
--- a/Textures/Projectiles/Projectile_Capricorn.png.import
+++ b/Textures/Projectiles/Projectile_Capricorn.png.import
@@ -3,25 +3,26 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dha44dnvwhajo"
-path="res://.godot/imported/Projectile_Capricorn.png-e7e1ea185b76409d5041dbe214e7dc40.ctex"
+path.s3tc="res://.godot/imported/Projectile_Capricorn.png-e7e1ea185b76409d5041dbe214e7dc40.s3tc.ctex"
metadata={
-"vram_texture": false
+"imported_formats": ["s3tc_bptc"],
+"vram_texture": true
}
[deps]
source_file="res://Textures/Projectiles/Projectile_Capricorn.png"
-dest_files=["res://.godot/imported/Projectile_Capricorn.png-e7e1ea185b76409d5041dbe214e7dc40.ctex"]
+dest_files=["res://.godot/imported/Projectile_Capricorn.png-e7e1ea185b76409d5041dbe214e7dc40.s3tc.ctex"]
[params]
-compress/mode=0
+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=false
+mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
@@ -31,4 +32,4 @@ 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
+detect_3d/compress_to=0