✨ Bullet, shooting & camera shake
This commit is contained in:
@ -5,6 +5,7 @@ namespace AceField.Scripts.Logic;
|
||||
public partial class PlayerInput : MultiplayerSynchronizer
|
||||
{
|
||||
[Export] public bool IsDashing;
|
||||
[Export] public bool IsShooting;
|
||||
|
||||
[Export] public Vector2 MovementDirection;
|
||||
|
||||
@ -21,12 +22,18 @@ public partial class PlayerInput : MultiplayerSynchronizer
|
||||
private void Dash()
|
||||
=> IsDashing = true;
|
||||
|
||||
[Rpc(CallLocal = true)]
|
||||
private void Shoot()
|
||||
=> IsShooting = true;
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
MovementDirection = Input.GetVector("move_left", "move_right", "move_up", "move_down");
|
||||
|
||||
if (Input.IsActionJustPressed("move_dash"))
|
||||
Rpc(nameof(Dash));
|
||||
if (Input.IsActionJustPressed("shoot"))
|
||||
Rpc(nameof(Shoot));
|
||||
}
|
||||
|
||||
public override void _Input(InputEvent evt)
|
||||
|
Reference in New Issue
Block a user