Capricorn laser done
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Scenes\" />
|
<Folder Include="Scenes\" />
|
||||||
|
<Folder Include="Scenes\Weapons\" />
|
||||||
<Folder Include="Textures\Models\" />
|
<Folder Include="Textures\Models\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -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="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="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="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://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://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"]
|
[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"]]
|
[node name="CapricornP1" type="CharacterBody3D" groups=["Player"]]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0)
|
||||||
script = ExtResource("1_rngpf")
|
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="."]
|
[node name="Pivot" type="Node3D" parent="."]
|
||||||
|
|
||||||
|
|||||||
51
Scenes/Weapons/CapricornLaser.tscn
Normal file
51
Scenes/Weapons/CapricornLaser.tscn
Normal file
@@ -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")
|
||||||
52
Scenes/Weapons/CapricornLaserAltFire.tscn
Normal file
52
Scenes/Weapons/CapricornLaserAltFire.tscn
Normal file
@@ -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")
|
||||||
@@ -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")
|
shape = SubResource("CylinderShape3D_eme14")
|
||||||
|
|
||||||
[node name="Sprite3D" type="Sprite3D" parent="RigidBody3D/CollisionShape3D"]
|
[node name="Sprite3D" type="Sprite3D" parent="RigidBody3D/CollisionShape3D"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
|
|
||||||
axis = 1
|
axis = 1
|
||||||
texture = ExtResource("2_a612r")
|
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")
|
shape = SubResource("CylinderShape3D_752q2")
|
||||||
|
|
||||||
[node name="Sprite3D" type="Sprite3D" parent="RigidBody3D2/CollisionShape3D"]
|
[node name="Sprite3D" type="Sprite3D" parent="RigidBody3D2/CollisionShape3D"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
|
|
||||||
axis = 1
|
axis = 1
|
||||||
texture = ExtResource("2_a612r")
|
texture = ExtResource("2_a612r")
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ Cooldown = 0.3
|
|||||||
_projectileSpeed = 10.0
|
_projectileSpeed = 10.0
|
||||||
|
|
||||||
[node name="RigidBody3D" type="RigidBody3D" parent="."]
|
[node name="RigidBody3D" type="RigidBody3D" parent="."]
|
||||||
collision_layer = 2
|
collision_layer = 34
|
||||||
collision_mask = 0
|
collision_mask = 34
|
||||||
gravity_scale = 0.0
|
gravity_scale = 0.0
|
||||||
continuous_cd = true
|
continuous_cd = true
|
||||||
max_contacts_reported = 1000
|
max_contacts_reported = 1000
|
||||||
|
|||||||
@@ -96,11 +96,11 @@ public partial class Capricorn : Character1
|
|||||||
private async void Fire()
|
private async void Fire()
|
||||||
{
|
{
|
||||||
IsShooting = true;
|
IsShooting = true;
|
||||||
//var projectile = _fireProjectile.Instantiate<Projectile>();
|
|
||||||
//projectile.Position = Position + new Vector3(0f, 1f, 0f);
|
|
||||||
//GetParent().AddChild(projectile);
|
|
||||||
CanShoot = false;
|
CanShoot = false;
|
||||||
await ToSignal(GetTree().CreateTimer(2.0f), "timeout");
|
await ToSignal(GetTree().CreateTimer(0.8f), "timeout");
|
||||||
|
var projectile = _fireProjectile.Instantiate<Projectile>();
|
||||||
|
projectile.Position = Position + new Vector3(0f, 1f, 0f);
|
||||||
|
GetParent().AddChild(projectile);
|
||||||
CanShoot = true;
|
CanShoot = true;
|
||||||
IsShooting = false;
|
IsShooting = false;
|
||||||
}
|
}
|
||||||
@@ -108,11 +108,11 @@ public partial class Capricorn : Character1
|
|||||||
private async void AltFire()
|
private async void AltFire()
|
||||||
{
|
{
|
||||||
IsShooting = true;
|
IsShooting = true;
|
||||||
//var projectile = _altFireProjectile.Instantiate<Projectile>();
|
|
||||||
//projectile.Position = Position + new Vector3(0f, 1f, 0f);
|
|
||||||
//GetParent().AddChild(projectile);
|
|
||||||
CanShoot = false;
|
CanShoot = false;
|
||||||
await ToSignal(GetTree().CreateTimer(2.0f), "timeout");
|
await ToSignal(GetTree().CreateTimer(0.8f), "timeout");
|
||||||
|
var projectile = _altFireProjectile.Instantiate<Projectile>();
|
||||||
|
projectile.Position = Position + new Vector3(0f, 1f, 0f);
|
||||||
|
GetParent().AddChild(projectile);
|
||||||
CanShoot = true;
|
CanShoot = true;
|
||||||
IsShooting = false;
|
IsShooting = false;
|
||||||
}
|
}
|
||||||
|
|||||||
12
Scripts/CapricornLaserShot.cs
Normal file
12
Scripts/CapricornLaserShot.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
using Godot;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
public partial class CapricornLaserShot : Projectile
|
||||||
|
{
|
||||||
|
public override void _PhysicsProcess(double delta)
|
||||||
|
{
|
||||||
|
var shots = GetChildren().OfType<RigidBody3D>();
|
||||||
|
shots.ElementAt(0).Translate(new Vector3(0, 0, Speed * -(float)delta));
|
||||||
|
shots.ElementAt(1).Translate(new Vector3(0, 0, Speed * (float)delta));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -161,8 +161,11 @@ public partial class GameManager : Node
|
|||||||
foreach (var player in players)
|
foreach (var player in players)
|
||||||
GetTree().Root.RemoveChild(player);
|
GetTree().Root.RemoveChild(player);
|
||||||
|
|
||||||
var main = GetTree().Root.GetNode<Main>("/root/Main");
|
var projectiles = GetTree().Root.GetChildren().OfType<Projectile>();
|
||||||
|
foreach (var projectile in projectiles)
|
||||||
|
GetTree().Root.RemoveChild(projectile);
|
||||||
|
|
||||||
|
var main = GetTree().Root.GetNode<Main>("/root/Main");
|
||||||
main.LoadNextLevel(_levelIndex++);
|
main.LoadNextLevel(_levelIndex++);
|
||||||
|
|
||||||
foreach (var player in Players)
|
foreach (var player in Players)
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ public partial class StageGUI : Control
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
player.IsSelectingCharacter = true;
|
player.IsSelectingCharacter = true;
|
||||||
|
ChangeBG(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void _Process(double delta)
|
public override void _Process(double delta)
|
||||||
|
|||||||
@@ -3,25 +3,26 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://dha44dnvwhajo"
|
uid="uid://dha44dnvwhajo"
|
||||||
path="res://.godot/imported/Projectile_Capricorn.png-e7e1ea185b76409d5041dbe214e7dc40.ctex"
|
path.s3tc="res://.godot/imported/Projectile_Capricorn.png-e7e1ea185b76409d5041dbe214e7dc40.s3tc.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://Textures/Projectiles/Projectile_Capricorn.png"
|
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]
|
[params]
|
||||||
|
|
||||||
compress/mode=0
|
compress/mode=2
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
mipmaps/generate=false
|
mipmaps/generate=true
|
||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
roughness/src_normal=""
|
||||||
@@ -31,4 +32,4 @@ process/normal_map_invert_y=false
|
|||||||
process/hdr_as_srgb=false
|
process/hdr_as_srgb=false
|
||||||
process/hdr_clamp_exposure=false
|
process/hdr_clamp_exposure=false
|
||||||
process/size_limit=0
|
process/size_limit=0
|
||||||
detect_3d/compress_to=1
|
detect_3d/compress_to=0
|
||||||
|
|||||||
Reference in New Issue
Block a user