Beeg checkin
11
Player/Base/Controls.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Godot;
|
||||
|
||||
public partial class Controls : CharacterBody3D
|
||||
{
|
||||
private GameManager _gameManager;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
_gameManager = GetTree().Root.GetNode<GameManager>("Main/GameManager");
|
||||
}
|
||||
}
|
||||
87
Player/Base/P1Controls.cs
Normal file
@@ -0,0 +1,87 @@
|
||||
using Godot;
|
||||
|
||||
public partial class P1Controls : Controls
|
||||
{
|
||||
[Export]
|
||||
private PackedScene _fireProjectile;
|
||||
[Export]
|
||||
private PackedScene _altFireProjectile;
|
||||
|
||||
[Export]
|
||||
private float _speed = 3.0f;
|
||||
|
||||
public bool CanShoot { get; protected set; }
|
||||
|
||||
private GameManager _gameManager;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
CanShoot = true;
|
||||
_gameManager = GetTree().Root.GetNode<GameManager>("Main/GameManager");
|
||||
}
|
||||
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
Velocity = CalculateCharacterMovement(delta);
|
||||
MoveAndSlide();
|
||||
}
|
||||
|
||||
public override void _UnhandledInput(InputEvent @event)
|
||||
{
|
||||
if (Input.IsActionJustPressed("exit"))
|
||||
GetTree().Quit();
|
||||
|
||||
if (Input.IsActionJustPressed($"p1_fire") && CanShoot)
|
||||
Fire();
|
||||
if (Input.IsActionJustPressed($"p1_altfire") && CanShoot)
|
||||
AltFire();
|
||||
}
|
||||
|
||||
private Vector3 CalculateCharacterMovement(double delta)
|
||||
{
|
||||
var velocity = Velocity;
|
||||
|
||||
var inputDir = Input.GetVector($"p1_left", $"p1_right", $"p1_up", $"p1_down");
|
||||
var direction = (Transform.Basis * new Vector3(inputDir.X, 0, inputDir.Y)).Normalized();
|
||||
if (direction != Vector3.Zero)
|
||||
{
|
||||
velocity.X = direction.X * _speed;
|
||||
velocity.Z = direction.Z * _speed;
|
||||
GetNode<Node3D>("Pivot").LookAt(Position + direction, Vector3.Up);
|
||||
}
|
||||
else
|
||||
{
|
||||
velocity.X = Mathf.MoveToward(Velocity.X, 0, _speed);
|
||||
velocity.Z = Mathf.MoveToward(Velocity.Z, 0, _speed);
|
||||
}
|
||||
return velocity;
|
||||
}
|
||||
|
||||
private async void Fire()
|
||||
{
|
||||
var projectile = _fireProjectile.Instantiate<Projectile>();
|
||||
projectile.Position = Position + new Vector3(0f, 1f, 0f);
|
||||
projectile.ParentCharacter = this;
|
||||
GetParent().AddChild(projectile);
|
||||
CanShoot = false;
|
||||
await ToSignal(GetTree().CreateTimer(projectile.Cooldown), "timeout");
|
||||
CanShoot = true;
|
||||
}
|
||||
|
||||
private async void AltFire()
|
||||
{
|
||||
var projectile = _altFireProjectile.Instantiate<Projectile>();
|
||||
projectile.Position = Position + new Vector3(0f, 1f, 0f);
|
||||
projectile.ParentCharacter = this;
|
||||
GetParent().AddChild(projectile);
|
||||
CanShoot = false;
|
||||
await ToSignal(GetTree().CreateTimer(projectile.Cooldown), "timeout");
|
||||
CanShoot = true;
|
||||
}
|
||||
|
||||
public void OnHit(Node3D node)
|
||||
{
|
||||
if (this != null)
|
||||
_gameManager.CallDeferred(GameManager.MethodName.RemoveCharacter, this);
|
||||
}
|
||||
}
|
||||
85
Player/Base/P2Controls.cs
Normal file
@@ -0,0 +1,85 @@
|
||||
using Godot;
|
||||
|
||||
public partial class P2Controls : Controls
|
||||
{
|
||||
[Export]
|
||||
private PackedScene _fireProjectile;
|
||||
[Export]
|
||||
private PackedScene _altFireProjectile;
|
||||
|
||||
[Export]
|
||||
private float _speed = 3.0f;
|
||||
|
||||
public bool CanShoot { get; protected set; }
|
||||
|
||||
private GameManager _gameManager;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
CanShoot = true;
|
||||
_gameManager = GetTree().Root.GetNode<GameManager>("Main/GameManager");
|
||||
}
|
||||
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
Velocity = CalculateCharacterMovement(delta);
|
||||
MoveAndSlide();
|
||||
}
|
||||
|
||||
public override void _UnhandledInput(InputEvent @event)
|
||||
{
|
||||
if (Input.IsActionJustPressed("exit"))
|
||||
GetTree().Quit();
|
||||
|
||||
if (Input.IsActionJustPressed($"p2_fire") && CanShoot)
|
||||
Fire();
|
||||
if (Input.IsActionJustPressed($"p2_altfire") && CanShoot)
|
||||
AltFire();
|
||||
}
|
||||
|
||||
private Vector3 CalculateCharacterMovement(double delta)
|
||||
{
|
||||
var velocity = Velocity;
|
||||
|
||||
var inputDir = Input.GetVector($"p2_left", $"p2_right", $"p2_up", $"p2_down");
|
||||
var direction = (Transform.Basis * new Vector3(inputDir.X, 0, inputDir.Y)).Normalized();
|
||||
if (direction != Vector3.Zero)
|
||||
{
|
||||
velocity.X = direction.X * _speed;
|
||||
velocity.Z = direction.Z * _speed;
|
||||
GetNode<Node3D>("Pivot").LookAt(Position + direction, Vector3.Up);
|
||||
GetNode<Node3D>("CollisionShape3D").LookAt(Position + direction, Vector3.Up);
|
||||
}
|
||||
else
|
||||
{
|
||||
velocity.X = Mathf.MoveToward(Velocity.X, 0, _speed);
|
||||
velocity.Z = Mathf.MoveToward(Velocity.Z, 0, _speed);
|
||||
}
|
||||
return velocity;
|
||||
}
|
||||
|
||||
private async void Fire()
|
||||
{
|
||||
var projectile = _fireProjectile.Instantiate<Projectile>();
|
||||
projectile.Position = Position + new Vector3(0f, 1f, 0f);
|
||||
GetParent().AddChild(projectile);
|
||||
CanShoot = false;
|
||||
await ToSignal(GetTree().CreateTimer(projectile.Cooldown), "timeout");
|
||||
CanShoot = true;
|
||||
}
|
||||
|
||||
private async void AltFire()
|
||||
{
|
||||
var projectile = _altFireProjectile.Instantiate<Projectile>();
|
||||
projectile.Position = Position + new Vector3(0f, 1f, 0f);
|
||||
GetParent().AddChild(projectile);
|
||||
CanShoot = false;
|
||||
await ToSignal(GetTree().CreateTimer(projectile.Cooldown), "timeout");
|
||||
CanShoot = true;
|
||||
}
|
||||
|
||||
public void OnHit(Node3D node)
|
||||
{
|
||||
_gameManager.RemoveCharacter(this);
|
||||
}
|
||||
}
|
||||
18
Player/Base/Player1.tscn
Normal file
@@ -0,0 +1,18 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://xcmspevaqcrc"]
|
||||
|
||||
[ext_resource type="Script" path="res://Player/Base/PlayerManager.cs" id="1_mmi2c"]
|
||||
[ext_resource type="PackedScene" uid="uid://b38hcomu4tpm5" path="res://Player/Pisces/P1PiscesWitch.tscn" id="2_g10gf"]
|
||||
[ext_resource type="PackedScene" uid="uid://iempdafdn6ct" path="res://Player/Scorpio/P1PlayerScorpio.tscn" id="3_nsh6r"]
|
||||
[ext_resource type="PackedScene" uid="uid://bgkqfamdiwrrw" path="res://Player/Sagittarius/P1Megami.tscn" id="4_vnhuv"]
|
||||
[ext_resource type="PackedScene" uid="uid://crkon4c8ah1a2" path="res://Player/Capricorn/CapricornP1.tscn" id="5_ccoeb"]
|
||||
[ext_resource type="Script" path="res://Player/Base/SpawnPoint.cs" id="6_lida8"]
|
||||
|
||||
[node name="Player1" type="Node3D" node_paths=PackedStringArray("SpawnPoint")]
|
||||
script = ExtResource("1_mmi2c")
|
||||
SpawnPoint = NodePath("Marker3D")
|
||||
PlayableCharacterScenes = Array[PackedScene]([ExtResource("2_g10gf"), ExtResource("3_nsh6r"), ExtResource("4_vnhuv"), ExtResource("5_ccoeb")])
|
||||
|
||||
[node name="Marker3D" type="Marker3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.5, 0, 5.513)
|
||||
gizmo_extents = 1.0
|
||||
script = ExtResource("6_lida8")
|
||||
15
Player/Base/Player2.tscn
Normal file
@@ -0,0 +1,15 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://b57xus5rqasy8"]
|
||||
|
||||
[ext_resource type="Script" path="res://Player/Base/PlayerManager.cs" id="1_gttsr"]
|
||||
[ext_resource type="Script" path="res://Player/Base/SpawnPoint.cs" id="1_xs6nn"]
|
||||
[ext_resource type="PackedScene" uid="uid://dfanwejjy3iue" path="res://Player/Pisces/P2PiscesWitch.tscn" id="2_78cal"]
|
||||
[ext_resource type="PackedScene" uid="uid://cg6hdoeq70ke8" path="res://Player/Scorpio/P2PlayerScorpio.tscn" id="3_04rrx"]
|
||||
|
||||
[node name="Player2" type="Node3D" groups=["Player"]]
|
||||
script = ExtResource("1_gttsr")
|
||||
PlayableCharacterScenes = Array[PackedScene]([ExtResource("2_78cal"), ExtResource("3_04rrx")])
|
||||
|
||||
[node name="Marker3D" type="Marker3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.5, 0, 5.513)
|
||||
gizmo_extents = 1.0
|
||||
script = ExtResource("1_xs6nn")
|
||||
30
Player/Base/PlayerManager.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using Godot;
|
||||
using Godot.Collections;
|
||||
|
||||
public partial class PlayerManager : Node3D
|
||||
{
|
||||
[Export]
|
||||
public SpawnPoint SpawnPoint;
|
||||
|
||||
[Export]
|
||||
public Array<PackedScene> PlayableCharacterScenes;
|
||||
|
||||
public Array<Controls> CharactersLeftOnStage = new Array<Controls>();
|
||||
|
||||
public Controls SelectedCharacter;
|
||||
|
||||
public bool IsSelectingCharacter = false;
|
||||
|
||||
public int _characterIndex = 0;
|
||||
|
||||
public bool GameOver = false;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
foreach (var character in PlayableCharacterScenes)
|
||||
{
|
||||
var instance = character.Instantiate();
|
||||
CharactersLeftOnStage.Add((Controls)instance);
|
||||
}
|
||||
}
|
||||
}
|
||||
29
Player/Base/Projectile.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Godot;
|
||||
|
||||
public partial class Projectile : Node3D
|
||||
{
|
||||
[Export]
|
||||
public double Cooldown { get; protected set; }
|
||||
[Export]
|
||||
public AudioStream _soundEffect;
|
||||
|
||||
public Controls ParentCharacter;
|
||||
|
||||
[Export]
|
||||
private float _projectileSpeed = 1f;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
Speed = _projectileSpeed;
|
||||
var sfxPlayer = GetTree().Root.GetNode<AudioStreamPlayer>("Main/SFXPlayer");
|
||||
sfxPlayer.Stream = _soundEffect;
|
||||
sfxPlayer.Play();
|
||||
}
|
||||
|
||||
public float Speed { get; private set; }
|
||||
|
||||
public void OnTimeToLiveTimeout()
|
||||
{
|
||||
QueueFree();
|
||||
}
|
||||
}
|
||||
10
Player/Base/SpawnPoint.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Godot;
|
||||
|
||||
public partial class SpawnPoint : Marker3D
|
||||
{
|
||||
public void SetPlayerPosition(Node3D character)
|
||||
{
|
||||
GD.Print("Moving character to spawn point");
|
||||
character.Position = Position;
|
||||
}
|
||||
}
|
||||
54
Player/Capricorn/Attacks/CapricornLaser.tscn
Normal file
@@ -0,0 +1,54 @@
|
||||
[gd_scene load_steps=5 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://Player/Capricorn/Attacks/CapricornLaserShot.cs" id="1_nkyy8"]
|
||||
[ext_resource type="AudioStream" uid="uid://bykwwct1not4e" path="res://Audio/SFX/capricorn laeser.wav" id="2_lofnw"]
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_bnunv"]
|
||||
height = 7.40727
|
||||
radius = 0.419241
|
||||
|
||||
[node name="CapricornLaser" type="Node3D"]
|
||||
script = ExtResource("1_nkyy8")
|
||||
_soundEffect = ExtResource("2_lofnw")
|
||||
_projectileSpeed = 3.0
|
||||
|
||||
[node name="Forward Shot" type="RigidBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.5)
|
||||
collision_layer = 0
|
||||
collision_mask = 34
|
||||
gravity_scale = 0.0
|
||||
continuous_cd = true
|
||||
max_contacts_reported = 1
|
||||
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 = 0
|
||||
collision_mask = 34
|
||||
gravity_scale = 0.0
|
||||
continuous_cd = true
|
||||
max_contacts_reported = 1
|
||||
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")
|
||||
55
Player/Capricorn/Attacks/CapricornLaserAltFire.tscn
Normal file
@@ -0,0 +1,55 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://cdsc35cj566q1"]
|
||||
|
||||
[ext_resource type="Script" path="res://Player/Capricorn/Attacks/CapricornLaserShot.cs" id="1_8lywi"]
|
||||
[ext_resource type="Texture2D" uid="uid://dha44dnvwhajo" path="res://Textures/Projectiles/Projectile_Capricorn.png" id="2_8osg4"]
|
||||
[ext_resource type="AudioStream" uid="uid://bykwwct1not4e" path="res://Audio/SFX/capricorn laeser.wav" id="2_jeoco"]
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_bnunv"]
|
||||
height = 8.32444
|
||||
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")
|
||||
_soundEffect = ExtResource("2_jeoco")
|
||||
_projectileSpeed = 3.0
|
||||
|
||||
[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 = 1
|
||||
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 = 1
|
||||
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")
|
||||
12
Player/Capricorn/Attacks/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));
|
||||
}
|
||||
}
|
||||
248
Player/Capricorn/CapricornP1.tscn
Normal file
@@ -0,0 +1,248 @@
|
||||
[gd_scene load_steps=36 format=3 uid="uid://crkon4c8ah1a2"]
|
||||
|
||||
[ext_resource type="Script" path="res://Player/Capricorn/CapricornP1Controls.cs" id="1_02lam"]
|
||||
[ext_resource type="PackedScene" uid="uid://5ce7ky4o0q2e" path="res://Player/Capricorn/Attacks/CapricornLaser.tscn" id="2_5fur4"]
|
||||
[ext_resource type="Texture2D" uid="uid://s0j0kj4ila8s" path="res://Player/Capricorn/Sprites/GameJam_DevilCapricorn_AttackForward.png" id="2_ebqay"]
|
||||
[ext_resource type="PackedScene" uid="uid://cdsc35cj566q1" path="res://Player/Capricorn/Attacks/CapricornLaserAltFire.tscn" id="3_7c7sn"]
|
||||
[ext_resource type="Texture2D" uid="uid://dchysrwcxhfvx" path="res://Player/Capricorn/Sprites/GameJam_DevilCapricorn_AttackBehind.png" id="3_c6jic"]
|
||||
[ext_resource type="Texture2D" uid="uid://cju5ycxiuwy25" path="res://Player/Capricorn/Sprites/GameJam_DevilCapricorn_AttackSide.png" id="4_ivql6"]
|
||||
[ext_resource type="Texture2D" uid="uid://utm2g5q7m2b3" path="res://Player/Capricorn/Sprites/GameJam_DevilCapricorn_WalkForward.png" id="5_7h4md"]
|
||||
[ext_resource type="Texture2D" uid="uid://w444vcu8rvae" path="res://Player/Capricorn/Sprites/GameJam_DevilCapricorn_WalkBehind.png" id="6_go5g3"]
|
||||
[ext_resource type="Texture2D" uid="uid://c5t256wcykb47" path="res://Player/Capricorn/Sprites/GameJam_DevilCapricorn_WalkSide.png" id="7_3c18n"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_njxhk"]
|
||||
atlas = ExtResource("2_ebqay")
|
||||
region = Rect2(0, 0, 120, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bmuvx"]
|
||||
atlas = ExtResource("2_ebqay")
|
||||
region = Rect2(120, 0, 120, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_14ft5"]
|
||||
atlas = ExtResource("2_ebqay")
|
||||
region = Rect2(240, 0, 120, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_olmdj"]
|
||||
atlas = ExtResource("2_ebqay")
|
||||
region = Rect2(360, 0, 120, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qaudm"]
|
||||
atlas = ExtResource("3_c6jic")
|
||||
region = Rect2(0, 0, 120, 144)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_a52sr"]
|
||||
atlas = ExtResource("3_c6jic")
|
||||
region = Rect2(120, 0, 120, 144)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qkrgl"]
|
||||
atlas = ExtResource("3_c6jic")
|
||||
region = Rect2(240, 0, 120, 144)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_k5oj5"]
|
||||
atlas = ExtResource("3_c6jic")
|
||||
region = Rect2(360, 0, 120, 144)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6iqcx"]
|
||||
atlas = ExtResource("4_ivql6")
|
||||
region = Rect2(0, 0, 113, 142)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_kiiv3"]
|
||||
atlas = ExtResource("4_ivql6")
|
||||
region = Rect2(113, 0, 113, 142)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_up4ur"]
|
||||
atlas = ExtResource("4_ivql6")
|
||||
region = Rect2(226, 0, 113, 142)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_hvxie"]
|
||||
atlas = ExtResource("4_ivql6")
|
||||
region = Rect2(339, 0, 113, 142)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vc5hj"]
|
||||
atlas = ExtResource("5_7h4md")
|
||||
region = Rect2(0, 0, 120, 128)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_672u0"]
|
||||
atlas = ExtResource("5_7h4md")
|
||||
region = Rect2(120, 0, 120, 128)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_po3o8"]
|
||||
atlas = ExtResource("5_7h4md")
|
||||
region = Rect2(240, 0, 120, 128)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_v0my0"]
|
||||
atlas = ExtResource("5_7h4md")
|
||||
region = Rect2(360, 0, 120, 128)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fge82"]
|
||||
atlas = ExtResource("6_go5g3")
|
||||
region = Rect2(0, 0, 120, 132)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_v2d05"]
|
||||
atlas = ExtResource("6_go5g3")
|
||||
region = Rect2(120, 0, 120, 132)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_mkdc6"]
|
||||
atlas = ExtResource("6_go5g3")
|
||||
region = Rect2(240, 0, 120, 132)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0nnnw"]
|
||||
atlas = ExtResource("6_go5g3")
|
||||
region = Rect2(360, 0, 120, 132)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_sjqet"]
|
||||
atlas = ExtResource("7_3c18n")
|
||||
region = Rect2(0, 0, 113, 130)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_l8c3l"]
|
||||
atlas = ExtResource("7_3c18n")
|
||||
region = Rect2(113, 0, 113, 130)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_a72tn"]
|
||||
atlas = ExtResource("7_3c18n")
|
||||
region = Rect2(226, 0, 113, 130)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_s2v14"]
|
||||
atlas = ExtResource("7_3c18n")
|
||||
region = Rect2(339, 0, 113, 130)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_h2iud"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_njxhk")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_bmuvx")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_14ft5")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_olmdj")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"AttackBack",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qaudm")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_a52sr")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qkrgl")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_k5oj5")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"AttackForward",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_6iqcx")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_kiiv3")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_up4ur")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_hvxie")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"AttackSide",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_vc5hj")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_672u0")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_po3o8")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_v0my0")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"WalkBack",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_fge82")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_v2d05")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_mkdc6")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_0nnnw")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"WalkForward",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_sjqet")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_l8c3l")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_a72tn")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_s2v14")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"WalkSide",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_r4spg"]
|
||||
size = Vector3(0.856928, 1.65704, 0.82877)
|
||||
|
||||
[node name="CapricornP1" type="CharacterBody3D" groups=["Player"]]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.408962, 0)
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_02lam")
|
||||
_fireProjectile = ExtResource("2_5fur4")
|
||||
_altFireProjectile = ExtResource("3_7c7sn")
|
||||
_fireProjectile = ExtResource("2_5fur4")
|
||||
_altFireProjectile = ExtResource("3_7c7sn")
|
||||
|
||||
[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)
|
||||
billboard = 1
|
||||
sprite_frames = SubResource("SpriteFrames_h2iud")
|
||||
animation = &"WalkSide"
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.41651, 0)
|
||||
shape = SubResource("BoxShape3D_r4spg")
|
||||
|
||||
[node name="Area3D" type="Area3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.75657e-15, 1.43031, 0)
|
||||
disable_mode = 2
|
||||
collision_layer = 16
|
||||
collision_mask = 4100
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
|
||||
transform = Transform3D(0.999665, -0.0258978, -7.10543e-15, 0.0258978, 0.999665, 0, 0, 0, 1, 0, 0, 0)
|
||||
shape = SubResource("BoxShape3D_r4spg")
|
||||
|
||||
[connection signal="body_entered" from="Area3D" to="." method="OnHit" flags=18]
|
||||
148
Player/Capricorn/CapricornP1Controls.cs
Normal file
@@ -0,0 +1,148 @@
|
||||
using Godot;
|
||||
|
||||
public partial class CapricornP1Controls : P1Controls
|
||||
{
|
||||
private AnimatedSprite3D _sprite;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
_sprite = GetNode<AnimatedSprite3D>("Pivot/Sprite");
|
||||
CanShoot = true;
|
||||
_gameManager = GetTree().Root.GetNode<GameManager>("Main/GameManager");
|
||||
}
|
||||
|
||||
[Export]
|
||||
private PackedScene _fireProjectile;
|
||||
[Export]
|
||||
private PackedScene _altFireProjectile;
|
||||
|
||||
[Export]
|
||||
private float _speed = 3.0f;
|
||||
|
||||
public bool IsShooting = false;
|
||||
|
||||
private GameManager _gameManager;
|
||||
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
Velocity = CalculateCharacterMovement(delta);
|
||||
MoveAndSlide();
|
||||
}
|
||||
|
||||
public override void _UnhandledInput(InputEvent @event)
|
||||
{
|
||||
if (Input.IsActionJustPressed("exit"))
|
||||
GetTree().Quit();
|
||||
|
||||
if (Input.IsActionJustPressed($"p1_fire") && CanShoot)
|
||||
Fire();
|
||||
if (Input.IsActionJustPressed($"p1_altfire") && CanShoot)
|
||||
AltFire();
|
||||
}
|
||||
|
||||
private Vector3 CalculateCharacterMovement(double delta)
|
||||
{
|
||||
var velocity = Velocity;
|
||||
|
||||
var inputDir = Input.GetVector($"p1_left", $"p1_right", $"p1_up", $"p1_down");
|
||||
var direction = (Transform.Basis * new Vector3(inputDir.X, 0, inputDir.Y)).Normalized();
|
||||
if (direction != Vector3.Zero)
|
||||
{
|
||||
velocity.X = direction.X * _speed;
|
||||
velocity.Z = direction.Z * _speed;
|
||||
}
|
||||
else
|
||||
{
|
||||
velocity.X = Mathf.MoveToward(Velocity.X, 0, _speed);
|
||||
velocity.Z = Mathf.MoveToward(Velocity.Z, 0, _speed);
|
||||
}
|
||||
|
||||
if (IsShooting)
|
||||
AttackSprite(direction);
|
||||
else
|
||||
WalkSprite(direction);
|
||||
|
||||
if (!IsShooting && direction.IsEqualApprox(Vector3.Zero))
|
||||
{
|
||||
_sprite.Play("WalkForward");
|
||||
_sprite.Stop();
|
||||
}
|
||||
|
||||
return velocity;
|
||||
}
|
||||
|
||||
private void WalkSprite(Vector3 direction)
|
||||
{
|
||||
var roundedDirection = direction.Round();
|
||||
|
||||
if (roundedDirection == Vector3.Right)
|
||||
{
|
||||
_sprite.Play("WalkSide");
|
||||
_sprite.FlipH = false;
|
||||
}
|
||||
if (roundedDirection == Vector3.Left)
|
||||
{
|
||||
_sprite.Play("WalkSide");
|
||||
_sprite.FlipH = true;
|
||||
}
|
||||
if (roundedDirection == Vector3.Forward)
|
||||
_sprite.Play("WalkForward");
|
||||
if (roundedDirection == Vector3.Back)
|
||||
_sprite.Play("WalkBack");
|
||||
}
|
||||
|
||||
private async void Fire()
|
||||
{
|
||||
IsShooting = true;
|
||||
CanShoot = false;
|
||||
await ToSignal(GetTree().CreateTimer(0.8f), "timeout");
|
||||
var projectile = _fireProjectile.Instantiate<Projectile>();
|
||||
projectile.Position = Position + new Vector3(0f, 1f, 0f);
|
||||
projectile.ParentCharacter = this;
|
||||
GetParent().AddChild(projectile);
|
||||
CanShoot = true;
|
||||
IsShooting = false;
|
||||
}
|
||||
|
||||
private async void AltFire()
|
||||
{
|
||||
IsShooting = true;
|
||||
CanShoot = false;
|
||||
await ToSignal(GetTree().CreateTimer(0.8f), "timeout");
|
||||
var projectile = _altFireProjectile.Instantiate<Projectile>();
|
||||
projectile.Position = Position + new Vector3(0f, 1f, 0f);
|
||||
projectile.ParentCharacter = this;
|
||||
GetParent().AddChild(projectile);
|
||||
CanShoot = true;
|
||||
IsShooting = false;
|
||||
}
|
||||
|
||||
private void AttackSprite(Vector3 direction)
|
||||
{
|
||||
var roundedDirection = direction.Round();
|
||||
|
||||
if (roundedDirection == Vector3.Right)
|
||||
{
|
||||
_sprite.Play("AttackSide");
|
||||
_sprite.FlipH = false;
|
||||
}
|
||||
if (roundedDirection == Vector3.Left)
|
||||
{
|
||||
_sprite.Play("AttackSide");
|
||||
_sprite.FlipH = true;
|
||||
}
|
||||
if (roundedDirection == Vector3.Forward)
|
||||
_sprite.Play("AttackForward");
|
||||
if (roundedDirection == Vector3.Back)
|
||||
_sprite.Play("AttackBack");
|
||||
|
||||
if (direction.IsEqualApprox(Vector3.Zero))
|
||||
_sprite.Play("AttackForward");
|
||||
}
|
||||
|
||||
public new void OnHit(Node3D node)
|
||||
{
|
||||
if (this != null)
|
||||
_gameManager.CallDeferred(GameManager.MethodName.RemoveCharacter, this);
|
||||
}
|
||||
}
|
||||
248
Player/Capricorn/CapricornP2.tscn
Normal file
@@ -0,0 +1,248 @@
|
||||
[gd_scene load_steps=36 format=3 uid="uid://db6xew8wvbcl8"]
|
||||
|
||||
[ext_resource type="Script" path="res://Player/Capricorn/CapricornP2Controls.cs" id="1_5dwa3"]
|
||||
[ext_resource type="Texture2D" uid="uid://s0j0kj4ila8s" path="res://Player/Capricorn/Sprites/GameJam_DevilCapricorn_AttackForward.png" id="2_8qhd4"]
|
||||
[ext_resource type="PackedScene" uid="uid://5ce7ky4o0q2e" path="res://Player/Capricorn/Attacks/CapricornLaser.tscn" id="2_241c5"]
|
||||
[ext_resource type="PackedScene" uid="uid://cdsc35cj566q1" path="res://Player/Capricorn/Attacks/CapricornLaserAltFire.tscn" id="3_4gj1h"]
|
||||
[ext_resource type="Texture2D" uid="uid://dchysrwcxhfvx" path="res://Player/Capricorn/Sprites/GameJam_DevilCapricorn_AttackBehind.png" id="3_qftyj"]
|
||||
[ext_resource type="Texture2D" uid="uid://cju5ycxiuwy25" path="res://Player/Capricorn/Sprites/GameJam_DevilCapricorn_AttackSide.png" id="4_pwka2"]
|
||||
[ext_resource type="Texture2D" uid="uid://utm2g5q7m2b3" path="res://Player/Capricorn/Sprites/GameJam_DevilCapricorn_WalkForward.png" id="5_4q5hl"]
|
||||
[ext_resource type="Texture2D" uid="uid://w444vcu8rvae" path="res://Player/Capricorn/Sprites/GameJam_DevilCapricorn_WalkBehind.png" id="6_x36jg"]
|
||||
[ext_resource type="Texture2D" uid="uid://c5t256wcykb47" path="res://Player/Capricorn/Sprites/GameJam_DevilCapricorn_WalkSide.png" id="7_03beh"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_njxhk"]
|
||||
atlas = ExtResource("2_8qhd4")
|
||||
region = Rect2(0, 0, 120, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bmuvx"]
|
||||
atlas = ExtResource("2_8qhd4")
|
||||
region = Rect2(120, 0, 120, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_14ft5"]
|
||||
atlas = ExtResource("2_8qhd4")
|
||||
region = Rect2(240, 0, 120, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_olmdj"]
|
||||
atlas = ExtResource("2_8qhd4")
|
||||
region = Rect2(360, 0, 120, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qaudm"]
|
||||
atlas = ExtResource("3_qftyj")
|
||||
region = Rect2(0, 0, 120, 144)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_a52sr"]
|
||||
atlas = ExtResource("3_qftyj")
|
||||
region = Rect2(120, 0, 120, 144)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qkrgl"]
|
||||
atlas = ExtResource("3_qftyj")
|
||||
region = Rect2(240, 0, 120, 144)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_k5oj5"]
|
||||
atlas = ExtResource("3_qftyj")
|
||||
region = Rect2(360, 0, 120, 144)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6iqcx"]
|
||||
atlas = ExtResource("4_pwka2")
|
||||
region = Rect2(0, 0, 113, 142)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_kiiv3"]
|
||||
atlas = ExtResource("4_pwka2")
|
||||
region = Rect2(113, 0, 113, 142)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_up4ur"]
|
||||
atlas = ExtResource("4_pwka2")
|
||||
region = Rect2(226, 0, 113, 142)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_hvxie"]
|
||||
atlas = ExtResource("4_pwka2")
|
||||
region = Rect2(339, 0, 113, 142)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vc5hj"]
|
||||
atlas = ExtResource("5_4q5hl")
|
||||
region = Rect2(0, 0, 120, 128)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_672u0"]
|
||||
atlas = ExtResource("5_4q5hl")
|
||||
region = Rect2(120, 0, 120, 128)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_po3o8"]
|
||||
atlas = ExtResource("5_4q5hl")
|
||||
region = Rect2(240, 0, 120, 128)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_v0my0"]
|
||||
atlas = ExtResource("5_4q5hl")
|
||||
region = Rect2(360, 0, 120, 128)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fge82"]
|
||||
atlas = ExtResource("6_x36jg")
|
||||
region = Rect2(0, 0, 120, 132)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_v2d05"]
|
||||
atlas = ExtResource("6_x36jg")
|
||||
region = Rect2(120, 0, 120, 132)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_mkdc6"]
|
||||
atlas = ExtResource("6_x36jg")
|
||||
region = Rect2(240, 0, 120, 132)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0nnnw"]
|
||||
atlas = ExtResource("6_x36jg")
|
||||
region = Rect2(360, 0, 120, 132)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_sjqet"]
|
||||
atlas = ExtResource("7_03beh")
|
||||
region = Rect2(0, 0, 113, 130)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_l8c3l"]
|
||||
atlas = ExtResource("7_03beh")
|
||||
region = Rect2(113, 0, 113, 130)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_a72tn"]
|
||||
atlas = ExtResource("7_03beh")
|
||||
region = Rect2(226, 0, 113, 130)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_s2v14"]
|
||||
atlas = ExtResource("7_03beh")
|
||||
region = Rect2(339, 0, 113, 130)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_h2iud"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_njxhk")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_bmuvx")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_14ft5")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_olmdj")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"AttackBack",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qaudm")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_a52sr")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qkrgl")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_k5oj5")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"AttackForward",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_6iqcx")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_kiiv3")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_up4ur")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_hvxie")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"AttackSide",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_vc5hj")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_672u0")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_po3o8")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_v0my0")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"WalkBack",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_fge82")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_v2d05")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_mkdc6")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_0nnnw")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"WalkForward",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_sjqet")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_l8c3l")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_a72tn")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_s2v14")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"WalkSide",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_r4spg"]
|
||||
size = Vector3(0.856928, 1.65704, 0.82877)
|
||||
|
||||
[node name="CapricornP2" type="CharacterBody3D" groups=["Player"]]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.704732, 0)
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_5dwa3")
|
||||
_fireProjectile = ExtResource("2_241c5")
|
||||
_altFireProjectile = ExtResource("3_4gj1h")
|
||||
_fireProjectile = ExtResource("2_241c5")
|
||||
_altFireProjectile = ExtResource("3_4gj1h")
|
||||
|
||||
[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)
|
||||
billboard = 1
|
||||
sprite_frames = SubResource("SpriteFrames_h2iud")
|
||||
animation = &"WalkSide"
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.41651, 0)
|
||||
shape = SubResource("BoxShape3D_r4spg")
|
||||
|
||||
[node name="Area3D" type="Area3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.75657e-15, 1.43031, 0)
|
||||
disable_mode = 2
|
||||
collision_layer = 16
|
||||
collision_mask = 4100
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
|
||||
transform = Transform3D(0.999665, -0.0258978, -7.10543e-15, 0.0258978, 0.999665, 0, 0, 0, 1, 0, 0, 0)
|
||||
shape = SubResource("BoxShape3D_r4spg")
|
||||
|
||||
[connection signal="body_entered" from="Area3D" to="." method="OnHit" flags=18]
|
||||
148
Player/Capricorn/CapricornP2Controls.cs
Normal file
@@ -0,0 +1,148 @@
|
||||
using Godot;
|
||||
|
||||
public partial class CapricornP2Controls : P2Controls
|
||||
{
|
||||
private AnimatedSprite3D _sprite;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
_sprite = GetNode<AnimatedSprite3D>("Pivot/Sprite");
|
||||
CanShoot = true;
|
||||
_gameManager = GetTree().Root.GetNode<GameManager>("Main/GameManager");
|
||||
}
|
||||
|
||||
[Export]
|
||||
private PackedScene _fireProjectile;
|
||||
[Export]
|
||||
private PackedScene _altFireProjectile;
|
||||
|
||||
[Export]
|
||||
private float _speed = 3.0f;
|
||||
|
||||
public bool IsShooting = false;
|
||||
|
||||
private GameManager _gameManager;
|
||||
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
Velocity = CalculateCharacterMovement(delta);
|
||||
MoveAndSlide();
|
||||
}
|
||||
|
||||
public override void _UnhandledInput(InputEvent @event)
|
||||
{
|
||||
if (Input.IsActionJustPressed("exit"))
|
||||
GetTree().Quit();
|
||||
|
||||
if (Input.IsActionJustPressed($"p2_fire") && CanShoot)
|
||||
Fire();
|
||||
if (Input.IsActionJustPressed($"p2_altfire") && CanShoot)
|
||||
AltFire();
|
||||
}
|
||||
|
||||
private Vector3 CalculateCharacterMovement(double delta)
|
||||
{
|
||||
var velocity = Velocity;
|
||||
|
||||
var inputDir = Input.GetVector($"p2_left", $"p2_right", $"p2_up", $"p2_down");
|
||||
var direction = (Transform.Basis * new Vector3(inputDir.X, 0, inputDir.Y)).Normalized();
|
||||
if (direction != Vector3.Zero)
|
||||
{
|
||||
velocity.X = direction.X * _speed;
|
||||
velocity.Z = direction.Z * _speed;
|
||||
}
|
||||
else
|
||||
{
|
||||
velocity.X = Mathf.MoveToward(Velocity.X, 0, _speed);
|
||||
velocity.Z = Mathf.MoveToward(Velocity.Z, 0, _speed);
|
||||
}
|
||||
|
||||
if (IsShooting)
|
||||
AttackSprite(direction);
|
||||
else
|
||||
WalkSprite(direction);
|
||||
|
||||
if (!IsShooting && direction.IsEqualApprox(Vector3.Zero))
|
||||
{
|
||||
_sprite.Play("WalkForward");
|
||||
_sprite.Stop();
|
||||
}
|
||||
|
||||
return velocity;
|
||||
}
|
||||
|
||||
private void WalkSprite(Vector3 direction)
|
||||
{
|
||||
var roundedDirection = direction.Round();
|
||||
|
||||
if (roundedDirection == Vector3.Right)
|
||||
{
|
||||
_sprite.Play("WalkSide");
|
||||
_sprite.FlipH = false;
|
||||
}
|
||||
if (roundedDirection == Vector3.Left)
|
||||
{
|
||||
_sprite.Play("WalkSide");
|
||||
_sprite.FlipH = true;
|
||||
}
|
||||
if (roundedDirection == Vector3.Forward)
|
||||
_sprite.Play("WalkForward");
|
||||
if (roundedDirection == Vector3.Back)
|
||||
_sprite.Play("WalkBack");
|
||||
}
|
||||
|
||||
private async void Fire()
|
||||
{
|
||||
IsShooting = true;
|
||||
var projectile = _fireProjectile.Instantiate<Projectile>();
|
||||
projectile.Position = Position + new Vector3(0f, 1f, 0f);
|
||||
projectile.ParentCharacter = this;
|
||||
GetParent().AddChild(projectile);
|
||||
CanShoot = false;
|
||||
await ToSignal(GetTree().CreateTimer(2.0f), "timeout");
|
||||
CanShoot = true;
|
||||
IsShooting = false;
|
||||
}
|
||||
|
||||
private async void AltFire()
|
||||
{
|
||||
IsShooting = true;
|
||||
var projectile = _altFireProjectile.Instantiate<Projectile>();
|
||||
projectile.Position = Position + new Vector3(0f, 1f, 0f);
|
||||
projectile.ParentCharacter = this;
|
||||
GetParent().AddChild(projectile);
|
||||
CanShoot = false;
|
||||
await ToSignal(GetTree().CreateTimer(2.0f), "timeout");
|
||||
CanShoot = true;
|
||||
IsShooting = false;
|
||||
}
|
||||
|
||||
private void AttackSprite(Vector3 direction)
|
||||
{
|
||||
var roundedDirection = direction.Round();
|
||||
|
||||
if (roundedDirection == Vector3.Right)
|
||||
{
|
||||
_sprite.Play("AttackSide");
|
||||
_sprite.FlipH = false;
|
||||
}
|
||||
if (roundedDirection == Vector3.Left)
|
||||
{
|
||||
_sprite.Play("AttackSide");
|
||||
_sprite.FlipH = true;
|
||||
}
|
||||
if (roundedDirection == Vector3.Forward)
|
||||
_sprite.Play("AttackForward");
|
||||
if (roundedDirection == Vector3.Back)
|
||||
_sprite.Play("AttackBack");
|
||||
|
||||
if (direction.IsEqualApprox(Vector3.Zero))
|
||||
_sprite.Play("AttackForward");
|
||||
}
|
||||
|
||||
public new void OnHit(Node3D node)
|
||||
{
|
||||
if (this != null)
|
||||
_gameManager.CallDeferred(GameManager.MethodName.RemoveCharacter, this);
|
||||
}
|
||||
}
|
||||
BIN
Player/Capricorn/Sprites/GameJam_DevilCapricorn_AttackBehind.png
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dchysrwcxhfvx"
|
||||
path.s3tc="res://.godot/imported/GameJam_DevilCapricorn_AttackBehind.png-70d5e224e56cf0623c14f18dad3da5b9.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Player/Capricorn/Sprites/GameJam_DevilCapricorn_AttackBehind.png"
|
||||
dest_files=["res://.godot/imported/GameJam_DevilCapricorn_AttackBehind.png-70d5e224e56cf0623c14f18dad3da5b9.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
|
||||
|
After Width: | Height: | Size: 7.7 KiB |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://s0j0kj4ila8s"
|
||||
path.s3tc="res://.godot/imported/GameJam_DevilCapricorn_AttackForward.png-7b2178774de221fdd99bf3e1ea5b5bb9.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Player/Capricorn/Sprites/GameJam_DevilCapricorn_AttackForward.png"
|
||||
dest_files=["res://.godot/imported/GameJam_DevilCapricorn_AttackForward.png-7b2178774de221fdd99bf3e1ea5b5bb9.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
|
||||
BIN
Player/Capricorn/Sprites/GameJam_DevilCapricorn_AttackSide.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cju5ycxiuwy25"
|
||||
path.s3tc="res://.godot/imported/GameJam_DevilCapricorn_AttackSide.png-de42fd763e9dd0247dbfe7b955f9ae96.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Player/Capricorn/Sprites/GameJam_DevilCapricorn_AttackSide.png"
|
||||
dest_files=["res://.godot/imported/GameJam_DevilCapricorn_AttackSide.png-de42fd763e9dd0247dbfe7b955f9ae96.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
|
||||
BIN
Player/Capricorn/Sprites/GameJam_DevilCapricorn_WalkBehind.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://w444vcu8rvae"
|
||||
path.s3tc="res://.godot/imported/GameJam_DevilCapricorn_WalkBehind.png-a91aa867c827c8f06842955fcd6dcbfb.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Player/Capricorn/Sprites/GameJam_DevilCapricorn_WalkBehind.png"
|
||||
dest_files=["res://.godot/imported/GameJam_DevilCapricorn_WalkBehind.png-a91aa867c827c8f06842955fcd6dcbfb.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
|
||||
BIN
Player/Capricorn/Sprites/GameJam_DevilCapricorn_WalkForward.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://utm2g5q7m2b3"
|
||||
path.s3tc="res://.godot/imported/GameJam_DevilCapricorn_WalkForward.png-380df37963b3599a157785ded9d14c3e.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Player/Capricorn/Sprites/GameJam_DevilCapricorn_WalkForward.png"
|
||||
dest_files=["res://.godot/imported/GameJam_DevilCapricorn_WalkForward.png-380df37963b3599a157785ded9d14c3e.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
|
||||
BIN
Player/Capricorn/Sprites/GameJam_DevilCapricorn_WalkSide.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c5t256wcykb47"
|
||||
path.s3tc="res://.godot/imported/GameJam_DevilCapricorn_WalkSide.png-f2e7ef40da5b75a50fd28ce03c31a82c.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Player/Capricorn/Sprites/GameJam_DevilCapricorn_WalkSide.png"
|
||||
dest_files=["res://.godot/imported/GameJam_DevilCapricorn_WalkSide.png-f2e7ef40da5b75a50fd28ce03c31a82c.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
|
||||
13
Player/Pisces/Attacks/ShotgunBullet.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Godot;
|
||||
using System.Linq;
|
||||
|
||||
public partial class ShotgunBullet : Projectile
|
||||
{
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
var pellets = GetChildren().OfType<RigidBody3D>();
|
||||
|
||||
foreach (var pellet in pellets)
|
||||
pellet.Translate(new Vector3(pellet.Rotation.Y, 0, Speed * -(float)delta));
|
||||
}
|
||||
}
|
||||
81
Player/Pisces/Attacks/ShotgunBullet.tscn
Normal file
@@ -0,0 +1,81 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://bq40xbqibrk1y"]
|
||||
|
||||
[ext_resource type="Script" path="res://Player/Pisces/Attacks/ShotgunBullet.cs" id="1_0khuu"]
|
||||
[ext_resource type="Texture2D" uid="uid://crlvrwo2l11ja" path="res://Textures/Projectiles/Projectile_Pisces_MultiAttack.png" id="2_a612r"]
|
||||
[ext_resource type="AudioStream" uid="uid://cw1jlubd7wmw6" path="res://Audio/SFX/blue laser.wav" id="2_oxtlx"]
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_eme14"]
|
||||
radius = 0.3
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_752q2"]
|
||||
radius = 0.3
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_ebbqv"]
|
||||
radius = 0.3
|
||||
|
||||
[node name="ShotgunBullet" type="Node3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.73894, 0)
|
||||
script = ExtResource("1_0khuu")
|
||||
Cooldown = 0.5
|
||||
_soundEffect = ExtResource("2_oxtlx")
|
||||
_projectileSpeed = 15.0
|
||||
|
||||
[node name="RigidBody3D" type="RigidBody3D" parent="."]
|
||||
transform = Transform3D(0.99863, 0, -0.052336, 0, 1, 0, 0.052336, 0, 0.99863, -0.334469, 0, 0)
|
||||
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="RigidBody3D"]
|
||||
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"]
|
||||
axis = 1
|
||||
texture = ExtResource("2_a612r")
|
||||
|
||||
[node name="RigidBody3D2" type="RigidBody3D" parent="."]
|
||||
transform = Transform3D(0.99863, 0, 0.052336, 0, 1, 0, -0.052336, 0, 0.99863, 0.463951, 0, 0)
|
||||
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="RigidBody3D2"]
|
||||
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"]
|
||||
axis = 1
|
||||
texture = ExtResource("2_a612r")
|
||||
|
||||
[node name="RigidBody3D3" type="RigidBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0600076, 0, -0.345734)
|
||||
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="RigidBody3D3"]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
|
||||
shape = SubResource("CylinderShape3D_ebbqv")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="RigidBody3D3/CollisionShape3D"]
|
||||
axis = 1
|
||||
texture = ExtResource("2_a612r")
|
||||
|
||||
[node name="TTL" type="Timer" parent="."]
|
||||
process_callback = 0
|
||||
autostart = true
|
||||
|
||||
[connection signal="timeout" from="TTL" to="." method="OnTimeToLiveTimeout"]
|
||||
40
Player/Pisces/Attacks/Single.tscn
Normal file
@@ -0,0 +1,40 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://cyn2wn6ffsnu7"]
|
||||
|
||||
[ext_resource type="Script" path="res://Player/Pisces/Attacks/SingleShot.cs" id="1_18l5k"]
|
||||
[ext_resource type="AudioStream" uid="uid://cw1jlubd7wmw6" path="res://Audio/SFX/blue laser.wav" id="2_7lbn3"]
|
||||
[ext_resource type="Texture2D" uid="uid://kecmkchurnin" path="res://Textures/Projectiles/Projectile_Pisces_SingleAttack.png" id="2_d8lwd"]
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_njobr"]
|
||||
radius = 0.3
|
||||
|
||||
[node name="Single" type="Node3D"]
|
||||
script = ExtResource("1_18l5k")
|
||||
Cooldown = 0.3
|
||||
_soundEffect = ExtResource("2_7lbn3")
|
||||
_projectileSpeed = 10.0
|
||||
|
||||
[node name="RigidBody3D" type="RigidBody3D" parent="."]
|
||||
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="RigidBody3D"]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0.644825, 0)
|
||||
shape = SubResource("CylinderShape3D_njobr")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="RigidBody3D/CollisionShape3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.31565, 0.765425, 0.303541)
|
||||
centered = false
|
||||
axis = 1
|
||||
texture = ExtResource("2_d8lwd")
|
||||
|
||||
[node name="TTL" type="Timer" parent="."]
|
||||
process_callback = 0
|
||||
wait_time = 0.8
|
||||
autostart = true
|
||||
|
||||
[connection signal="timeout" from="TTL" to="." method="OnTimeToLiveTimeout"]
|
||||
11
Player/Pisces/Attacks/SingleShot.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Godot;
|
||||
using System.Linq;
|
||||
|
||||
public partial class SingleShot : Projectile
|
||||
{
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
var pellet = GetChildren().OfType<RigidBody3D>().Single();
|
||||
pellet.Translate(new Vector3(0, 0, Speed * -(float)delta));
|
||||
}
|
||||
}
|
||||
886
Player/Pisces/Models/fwitch.gltf
Normal file
32
Player/Pisces/Models/fwitch.gltf.import
Normal file
@@ -0,0 +1,32 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://yosw0j58nvrf"
|
||||
path="res://.godot/imported/fwitch.gltf-81abec961b3eeb978fc59a30df8d729c.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Player/Pisces/Models/fwitch.gltf"
|
||||
dest_files=["res://.godot/imported/fwitch.gltf-81abec961b3eeb978fc59a30df8d729c.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type="Node3D"
|
||||
nodes/root_name="Scene Root"
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
import_script/path=""
|
||||
_subresources={}
|
||||
gltf/embedded_image_handling=1
|
||||
39
Player/Pisces/P1PiscesWitch.tscn
Normal file
@@ -0,0 +1,39 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://b38hcomu4tpm5"]
|
||||
|
||||
[ext_resource type="Script" path="res://Player/Base/P1Controls.cs" id="1_13s3m"]
|
||||
[ext_resource type="PackedScene" uid="uid://cyn2wn6ffsnu7" path="res://Player/Pisces/Attacks/Single.tscn" id="2_y0wmm"]
|
||||
[ext_resource type="PackedScene" uid="uid://bq40xbqibrk1y" path="res://Player/Pisces/Attacks/ShotgunBullet.tscn" id="3_p4fqi"]
|
||||
[ext_resource type="PackedScene" uid="uid://yosw0j58nvrf" path="res://Player/Pisces/Models/fwitch.gltf" id="4_mtwuo"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_xynge"]
|
||||
size = Vector3(3.04879, 3.92906, 2.56521)
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_fqik1"]
|
||||
radius = 0.704872
|
||||
height = 1.67894
|
||||
|
||||
[node name="PiscesP1" type="CharacterBody3D" groups=["Player"]]
|
||||
transform = Transform3D(0.33, 0, 0, 0, 0.33, 0, 0, 0, 0.33, 0, 0.332056, 0)
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_13s3m")
|
||||
_fireProjectile = ExtResource("2_y0wmm")
|
||||
_altFireProjectile = ExtResource("3_p4fqi")
|
||||
|
||||
[node name="Pivot" type="Node3D" parent="."]
|
||||
|
||||
[node name="fwitch" parent="Pivot" instance=ExtResource("4_mtwuo")]
|
||||
|
||||
[node name="Area3D" type="Area3D" parent="Pivot"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.75657e-15, 0, 0)
|
||||
collision_layer = 16
|
||||
collision_mask = 4100
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pivot/Area3D"]
|
||||
transform = Transform3D(0.999665, -0.0258978, -7.10543e-15, 0.0258978, 0.999665, 0, 0, 0, 1, 0.0162379, 2.20309, -0.302385)
|
||||
shape = SubResource("BoxShape3D_xynge")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.06805, -0.211049)
|
||||
shape = SubResource("CapsuleShape3D_fqik1")
|
||||
|
||||
[connection signal="body_entered" from="Pivot/Area3D" to="." method="OnHit"]
|
||||
39
Player/Pisces/P2PiscesWitch.tscn
Normal file
@@ -0,0 +1,39 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://dfanwejjy3iue"]
|
||||
|
||||
[ext_resource type="Script" path="res://Player/Base/P2Controls.cs" id="1_0onpw"]
|
||||
[ext_resource type="PackedScene" uid="uid://cyn2wn6ffsnu7" path="res://Player/Pisces/Attacks/Single.tscn" id="2_285w6"]
|
||||
[ext_resource type="PackedScene" uid="uid://bq40xbqibrk1y" path="res://Player/Pisces/Attacks/ShotgunBullet.tscn" id="3_00thi"]
|
||||
[ext_resource type="PackedScene" uid="uid://yosw0j58nvrf" path="res://Player/Pisces/Models/fwitch.gltf" id="4_hwtlk"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_gqlci"]
|
||||
size = Vector3(3.04879, 3.92906, 2.56521)
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_fqik1"]
|
||||
radius = 0.704872
|
||||
height = 1.67894
|
||||
|
||||
[node name="PiscesP2" type="CharacterBody3D" groups=["Player"]]
|
||||
transform = Transform3D(0.33, 0, 0, 0, 0.33, 0, 0, 0, 0.33, 0, 0.533944, 0)
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_0onpw")
|
||||
_fireProjectile = ExtResource("2_285w6")
|
||||
_altFireProjectile = ExtResource("3_00thi")
|
||||
|
||||
[node name="Pivot" type="Node3D" parent="."]
|
||||
|
||||
[node name="fwitch" parent="Pivot" instance=ExtResource("4_hwtlk")]
|
||||
|
||||
[node name="Area3D" type="Area3D" parent="Pivot"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.75657e-15, 0, 0)
|
||||
collision_layer = 16
|
||||
collision_mask = 4100
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pivot/Area3D"]
|
||||
transform = Transform3D(0.999665, -0.0258978, -7.10543e-15, 0.0258978, 0.999665, 0, 0, 0, 1, -0.0242356, 2.05297, -0.302385)
|
||||
shape = SubResource("BoxShape3D_gqlci")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.06805, -0.211049)
|
||||
shape = SubResource("CapsuleShape3D_fqik1")
|
||||
|
||||
[connection signal="body_entered" from="Pivot/Area3D" to="." method="OnHit"]
|
||||
51
Player/Sagittarius/Attacks/MegamiBeam.tscn
Normal file
@@ -0,0 +1,51 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://criqb4bokctlr"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cferkvvp0rjht" path="res://Textures/Projectiles/Projectile_Sagittarius.png" id="1_57flt"]
|
||||
[ext_resource type="Script" path="res://Player/Sagittarius/Attacks/MegamiBeamShot.cs" id="1_a146o"]
|
||||
[ext_resource type="AudioStream" uid="uid://m8mvw8acs5sk" path="res://Audio/SFX/Green Wave.wav" id="2_vvcho"]
|
||||
|
||||
[sub_resource type="Curve3D" id="Curve3D_7ok4f"]
|
||||
_data = {
|
||||
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0.008, 1, -10),
|
||||
"tilts": PackedFloat32Array(0, 0)
|
||||
}
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_bnunv"]
|
||||
radius = 0.419241
|
||||
|
||||
[node name="MegamiBeam" type="Node3D" node_paths=PackedStringArray("_pathFollow")]
|
||||
script = ExtResource("1_a146o")
|
||||
_pathFollow = NodePath("Path3D/PathFollow3D")
|
||||
_soundEffect = ExtResource("2_vvcho")
|
||||
Cooldown = 3.0
|
||||
_soundEffect = ExtResource("2_vvcho")
|
||||
_projectileSpeed = 3.0
|
||||
|
||||
[node name="Path3D" type="Path3D" parent="."]
|
||||
top_level = true
|
||||
curve = SubResource("Curve3D_7ok4f")
|
||||
|
||||
[node name="PathFollow3D" type="PathFollow3D" parent="Path3D"]
|
||||
transform = Transform3D(-0.999999, 0, 0.000800044, 0, 1, 0, -0.000800044, 0, -0.999999, 0, 1, 0)
|
||||
loop = false
|
||||
tilt_enabled = false
|
||||
|
||||
[node name="Beam" type="RigidBody3D" parent="Path3D/PathFollow3D"]
|
||||
transform = Transform3D(-1, 0, -8.74229e-08, 0, 1, 0, 8.74229e-08, 0, -1, 0, 0, 0)
|
||||
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="Path3D/PathFollow3D/Beam"]
|
||||
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="Path3D/PathFollow3D/Beam"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00355998, 0, 0.140453)
|
||||
axis = 1
|
||||
texture = ExtResource("1_57flt")
|
||||
31
Player/Sagittarius/Attacks/MegamiBeamShot.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Godot;
|
||||
using System.Linq;
|
||||
|
||||
public partial class MegamiBeamShot : Projectile
|
||||
{
|
||||
[Export]
|
||||
private PathFollow3D _pathFollow;
|
||||
[Export]
|
||||
public new AudioStream _soundEffect;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
_pathFollow = GetNode<PathFollow3D>("Path3D/PathFollow3D");
|
||||
_pathFollow.GetParentNode3D().Rotation = ParentCharacter.GetNode<Node3D>("Pivot").Rotation;
|
||||
var sfxPlayer = GetTree().Root.GetNode<AudioStreamPlayer>("Main/SFXPlayer");
|
||||
sfxPlayer.Stream = _soundEffect;
|
||||
sfxPlayer.Play();
|
||||
}
|
||||
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
_pathFollow.Progress += 10f * (float)delta;
|
||||
if (Mathf.IsEqualApprox(_pathFollow.ProgressRatio, 1.0f))
|
||||
QueueFree();
|
||||
}
|
||||
|
||||
private void OnBulletHitObject(Node node)
|
||||
{
|
||||
QueueFree();
|
||||
}
|
||||
}
|
||||
1682
Player/Sagittarius/Models/megami.gltf
Normal file
32
Player/Sagittarius/Models/megami.gltf.import
Normal file
@@ -0,0 +1,32 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://dbggqsb82lg4l"
|
||||
path="res://.godot/imported/megami.gltf-de2fb44b8131c5dced844b9c5dc0e6fe.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Player/Sagittarius/Models/megami.gltf"
|
||||
dest_files=["res://.godot/imported/megami.gltf-de2fb44b8131c5dced844b9c5dc0e6fe.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type="CharacterBody3D"
|
||||
nodes/root_name="Scene Root"
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
import_script/path=""
|
||||
_subresources={}
|
||||
gltf/embedded_image_handling=1
|
||||
633
Player/Sagittarius/P1Megami.tscn
Normal file
27
Player/Scorpio/Attacks/CutterShot.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Godot;
|
||||
|
||||
public partial class CutterShot : Projectile
|
||||
{
|
||||
[Export]
|
||||
private PathFollow3D _pathFollow;
|
||||
[Export]
|
||||
private Sprite3D _sprite;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
base._Ready();
|
||||
_pathFollow = GetNode<PathFollow3D>("Path3D/PathFollow3D");
|
||||
}
|
||||
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
_pathFollow.Progress += 10f * (float)delta;
|
||||
if (Mathf.IsEqualApprox(_pathFollow.ProgressRatio, 1.0f))
|
||||
QueueFree();
|
||||
}
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
_sprite.RotateY(25);
|
||||
}
|
||||
}
|
||||
59
Player/Scorpio/Attacks/CutterShot.tscn
Normal file
@@ -0,0 +1,59 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://cxnek5wgpxbft"]
|
||||
|
||||
[ext_resource type="Script" path="res://Player/Scorpio/Attacks/CutterShot.cs" id="1_inha4"]
|
||||
[ext_resource type="Texture2D" uid="uid://cdryxdasvun4r" path="res://Textures/Projectiles/Projectile_Scorpio.png" id="2_tqxh6"]
|
||||
[ext_resource type="AudioStream" uid="uid://ce40y3hln3twm" path="res://Audio/SFX/grass cutter.wav" id="2_u4aoe"]
|
||||
|
||||
[sub_resource type="Curve3D" id="Curve3D_5hmi4"]
|
||||
_data = {
|
||||
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2.502, 1, -3.145, 0, 0, 0, 0, 0, 0, 2.033, 1, -6, 0, 0, 0, 0, 0, 0, -5, 1, -8),
|
||||
"tilts": PackedFloat32Array(0, 0, 0, 0)
|
||||
}
|
||||
point_count = 4
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_mgm2i"]
|
||||
height = 8.481
|
||||
|
||||
[node name="CutterShot" type="Node3D" node_paths=PackedStringArray("_pathFollow", "_sprite")]
|
||||
script = ExtResource("1_inha4")
|
||||
_pathFollow = NodePath("Path3D/PathFollow3D")
|
||||
_sprite = NodePath("Path3D/PathFollow3D/RigidBody3D/Sprite3D")
|
||||
Cooldown = 0.3
|
||||
_soundEffect = ExtResource("2_u4aoe")
|
||||
_projectileSpeed = 0.1
|
||||
|
||||
[node name="Path3D" type="Path3D" parent="."]
|
||||
top_level = true
|
||||
curve = SubResource("Curve3D_5hmi4")
|
||||
|
||||
[node name="PathFollow3D" type="PathFollow3D" parent="Path3D"]
|
||||
transform = Transform3D(-0.782564, 0, 0.622568, 0, 1, 0, -0.622568, 0, -0.782564, 0, 1, 0)
|
||||
loop = false
|
||||
tilt_enabled = false
|
||||
|
||||
[node name="RigidBody3D" type="RigidBody3D" parent="Path3D/PathFollow3D"]
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
gravity_scale = 0.0
|
||||
continuous_cd = true
|
||||
max_contacts_reported = 100
|
||||
contact_monitor = true
|
||||
can_sleep = false
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Path3D/PathFollow3D/RigidBody3D"]
|
||||
transform = Transform3D(0.999999, 0, 1.19209e-07, 0, 1, 0, -1.19209e-07, 0, 0.999999, 0, 0, 0)
|
||||
shape = SubResource("CylinderShape3D_mgm2i")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="Path3D/PathFollow3D/RigidBody3D"]
|
||||
transform = Transform3D(0.156513, 0, 0.124514, 0, 0.2, 0, -0.124514, 0, 0.156513, 0, 0, 0)
|
||||
pixel_size = 0.03
|
||||
axis = 1
|
||||
double_sided = false
|
||||
texture = ExtResource("2_tqxh6")
|
||||
|
||||
[node name="TTL" type="Timer" parent="."]
|
||||
process_callback = 0
|
||||
wait_time = 0.8
|
||||
autostart = true
|
||||
|
||||
[connection signal="timeout" from="TTL" to="." method="OnTimeToLiveTimeout"]
|
||||
59
Player/Scorpio/Attacks/CutterShotAltFire.tscn
Normal file
@@ -0,0 +1,59 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://cwt4rum7tvyvb"]
|
||||
|
||||
[ext_resource type="Script" path="res://Player/Scorpio/Attacks/CutterShot.cs" id="1_7xtlh"]
|
||||
[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_5hmi4"]
|
||||
_data = {
|
||||
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -2.502, 1, -3.145, 0, 0, 0, 0, 0, 0, -2.033, 1, -6, 0, 0, 0, 0, 0, 0, 5, 1, -8),
|
||||
"tilts": PackedFloat32Array(0, 0, 0, 0)
|
||||
}
|
||||
point_count = 4
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_mgm2i"]
|
||||
height = 8.481
|
||||
|
||||
[node name="CutterShot" type="Node3D" node_paths=PackedStringArray("_pathFollow", "_sprite")]
|
||||
script = ExtResource("1_7xtlh")
|
||||
_pathFollow = NodePath("Path3D/PathFollow3D")
|
||||
_sprite = NodePath("Path3D/PathFollow3D/RigidBody3D/CollisionShape3D/Sprite3D")
|
||||
Cooldown = 0.3
|
||||
_soundEffect = ExtResource("2_qmvk7")
|
||||
_projectileSpeed = 3.0
|
||||
|
||||
[node name="Path3D" type="Path3D" parent="."]
|
||||
top_level = true
|
||||
curve = SubResource("Curve3D_5hmi4")
|
||||
|
||||
[node name="PathFollow3D" type="PathFollow3D" parent="Path3D"]
|
||||
transform = Transform3D(-0.782564, 0, -0.622568, 0, 1, 0, 0.622568, 0, -0.782564, 0, 1, 0)
|
||||
loop = false
|
||||
tilt_enabled = false
|
||||
|
||||
[node name="RigidBody3D" type="RigidBody3D" parent="Path3D/PathFollow3D"]
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
gravity_scale = 0.0
|
||||
continuous_cd = true
|
||||
max_contacts_reported = 100
|
||||
contact_monitor = true
|
||||
can_sleep = false
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Path3D/PathFollow3D/RigidBody3D"]
|
||||
transform = Transform3D(0.999999, 0, 5.96046e-08, 0, 1, 0, -5.96046e-08, 0, 0.999999, 0, 0, 0)
|
||||
shape = SubResource("CylinderShape3D_mgm2i")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="Path3D/PathFollow3D/RigidBody3D/CollisionShape3D"]
|
||||
transform = Transform3D(0.156513, 0, 0.124514, 0, 0.2, 0, -0.124514, 0, 0.156513, 0, 0, 0)
|
||||
pixel_size = 0.03
|
||||
axis = 1
|
||||
double_sided = false
|
||||
texture = ExtResource("2_6mabu")
|
||||
|
||||
[node name="TTL" type="Timer" parent="."]
|
||||
process_callback = 0
|
||||
wait_time = 0.8
|
||||
autostart = true
|
||||
|
||||
[connection signal="timeout" from="TTL" to="." method="OnTimeToLiveTimeout"]
|
||||
264
Player/Scorpio/Models/scoprion.gltf
Normal file
1834
Player/Scorpio/Models/scoprion.gltf.import
Normal file
BIN
Player/Scorpio/Models/scoprion_GameJam_Scorpion_texture.png
Normal file
|
After Width: | Height: | Size: 151 KiB |
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ctdyuer3eshms"
|
||||
path.s3tc="res://.godot/imported/scoprion_GameJam_Scorpion_texture.png-452a26e1c315e42f7ba0b80d28287654.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
generator_parameters={}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Player/Scorpio/Models/scoprion_GameJam_Scorpion_texture.png"
|
||||
dest_files=["res://.godot/imported/scoprion_GameJam_Scorpion_texture.png-452a26e1c315e42f7ba0b80d28287654.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
|
||||
38
Player/Scorpio/P1PlayerScorpio.tscn
Normal file
@@ -0,0 +1,38 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://iempdafdn6ct"]
|
||||
|
||||
[ext_resource type="Script" path="res://Player/Base/P1Controls.cs" id="1_o7l70"]
|
||||
[ext_resource type="PackedScene" uid="uid://dyhimd6qec8fu" path="res://Player/Scorpio/ScorpioAnimated.tscn" id="2_pahgr"]
|
||||
[ext_resource type="PackedScene" uid="uid://cxnek5wgpxbft" path="res://Player/Scorpio/Attacks/CutterShot.tscn" id="2_uayjr"]
|
||||
[ext_resource type="PackedScene" uid="uid://cwt4rum7tvyvb" path="res://Player/Scorpio/Attacks/CutterShotAltFire.tscn" id="3_tw078"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_wqp0e"]
|
||||
size = Vector3(0.822782, 0.881451, 0.80108)
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_f8aaj"]
|
||||
size = Vector3(0.822782, 0.853857, 0.80108)
|
||||
|
||||
[node name="ScorpioP1" type="CharacterBody3D" groups=["Player"]]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.55696, 0)
|
||||
motion_mode = 1
|
||||
slide_on_ceiling = false
|
||||
script = ExtResource("1_o7l70")
|
||||
_fireProjectile = ExtResource("2_uayjr")
|
||||
_altFireProjectile = ExtResource("3_tw078")
|
||||
|
||||
[node name="Pivot" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.496155, 0)
|
||||
|
||||
[node name="scoprion" parent="Pivot" instance=ExtResource("2_pahgr")]
|
||||
|
||||
[node name="Area3D" type="Area3D" parent="Pivot"]
|
||||
collision_layer = 16
|
||||
collision_mask = 4100
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pivot/Area3D"]
|
||||
shape = SubResource("BoxShape3D_wqp0e")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.315199, 0)
|
||||
shape = SubResource("BoxShape3D_f8aaj")
|
||||
|
||||
[connection signal="body_entered" from="Pivot/Area3D" to="." method="OnHit"]
|
||||
37
Player/Scorpio/P2PlayerScorpio.tscn
Normal file
@@ -0,0 +1,37 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://cg6hdoeq70ke8"]
|
||||
|
||||
[ext_resource type="Script" path="res://Player/Base/P2Controls.cs" id="1_auboe"]
|
||||
[ext_resource type="PackedScene" uid="uid://cxnek5wgpxbft" path="res://Player/Scorpio/Attacks/CutterShot.tscn" id="2_iw8b0"]
|
||||
[ext_resource type="PackedScene" uid="uid://cwt4rum7tvyvb" path="res://Player/Scorpio/Attacks/CutterShotAltFire.tscn" id="3_61xde"]
|
||||
[ext_resource type="PackedScene" uid="uid://dyhimd6qec8fu" path="res://Player/Scorpio/ScorpioAnimated.tscn" id="4_c22td"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_wqp0e"]
|
||||
size = Vector3(0.822782, 0.527059, 0.80108)
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_f8aaj"]
|
||||
size = Vector3(0.822782, 0.527059, 0.80108)
|
||||
|
||||
[node name="ScorpioP2" type="CharacterBody3D" groups=["Player"]]
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_auboe")
|
||||
_fireProjectile = ExtResource("2_iw8b0")
|
||||
_altFireProjectile = ExtResource("3_61xde")
|
||||
|
||||
[node name="Pivot" type="Node3D" parent="."]
|
||||
|
||||
[node name="scoprion" parent="Pivot" instance=ExtResource("4_c22td")]
|
||||
|
||||
[node name="Area3D" type="Area3D" parent="Pivot"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.75657e-15, 0, 0)
|
||||
collision_layer = 16
|
||||
collision_mask = 4100
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pivot/Area3D"]
|
||||
transform = Transform3D(0.999665, -0.0258978, -7.10543e-15, 0.0258978, 0.999665, 0, 0, 0, 1, 0, 0, 0)
|
||||
shape = SubResource("BoxShape3D_wqp0e")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0761452, 0)
|
||||
shape = SubResource("BoxShape3D_f8aaj")
|
||||
|
||||
[connection signal="body_entered" from="Pivot/Area3D" to="." method="OnHit"]
|
||||