This commit is contained in:
2023-09-11 17:42:11 -07:00
parent ba9c1e320e
commit 4d8fbda71b
21 changed files with 123 additions and 67 deletions

View File

@@ -44,6 +44,7 @@ tilt_enabled = false
[node name="Hitbox" type="RigidBody3D" parent="Forward Shot/PathFollow3D"]
collision_layer = 44
collision_mask = 0
gravity_scale = 0.0
continuous_cd = true
max_contacts_reported = 1
@@ -75,6 +76,7 @@ tilt_enabled = false
[node name="Hitbox" type="RigidBody3D" parent="Backward Shot/PathFollow3D"]
collision_layer = 44
collision_mask = 0
gravity_scale = 0.0
continuous_cd = true
max_contacts_reported = 1

View File

@@ -44,6 +44,7 @@ tilt_enabled = false
[node name="HitBox" type="RigidBody3D" parent="Forward Shot/PathFollow3D"]
collision_layer = 44
collision_mask = 0
gravity_scale = 0.0
continuous_cd = true
max_contacts_reported = 1
@@ -76,6 +77,7 @@ tilt_enabled = false
[node name="HitBox" type="RigidBody3D" parent="Backward Shot/PathFollow3D"]
transform = Transform3D(0.999999, 0, 0.00207308, 0, 1, 0, -0.00207308, 0, 0.999999, 0.00236542, -1, -0.53373)
collision_layer = 44
collision_mask = 0
gravity_scale = 0.0
continuous_cd = true
max_contacts_reported = 1

View File

@@ -226,7 +226,7 @@ _speed = 1.5
[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)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.05046, 0)
billboard = 1
sprite_frames = SubResource("SpriteFrames_h2iud")
animation = &"WalkSide"

View File

@@ -8,6 +8,7 @@ public partial class CapricornControls : Character
public override void _Ready()
{
base._Ready();
Position = OwnerPlayer.SpawnPoint.Position;
_sprite = GetNode<AnimatedSprite3D>("Pivot/Sprite");
}
@@ -88,7 +89,8 @@ public partial class CapricornControls : Character
await ToSignal(GetTree().CreateTimer(1.0f), "timeout");
var projectile = _fireProjectile.Instantiate<Node3D>();
projectile.Position = Position;
GetParent().AddChild(projectile);
if (GetParent() != null)
GetParent().AddChild(projectile);
CanShoot = true;
IsShooting = false;
}
@@ -100,7 +102,8 @@ public partial class CapricornControls : Character
await ToSignal(GetTree().CreateTimer(1.0f), "timeout");
var projectile = _altFireProjectile.Instantiate<Node3D>();
projectile.Position = Position;
GetParent().AddChild(projectile);
if (GetParent() != null)
GetParent().AddChild(projectile);
CanShoot = true;
IsShooting = false;
}
@@ -130,7 +133,6 @@ public partial class CapricornControls : Character
public new void OnHit(Node3D node)
{
if (this != null)
_gameManager.CallDeferred(GameManager.MethodName.RemoveCharacter, OwnerPlayer);
_gameManager.CallDeferred(GameManager.MethodName.RemoveCharacter, OwnerPlayer);
}
}