mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-11 01:05:54 +00:00
Explosions
This commit is contained in:
parent
4bc76cc475
commit
e1d6afa512
21 changed files with 323 additions and 24 deletions
|
|
@ -53,16 +53,13 @@ public partial class PlayerMovement : CharacterBody2D
|
|||
|
||||
private void HandleShoot()
|
||||
{
|
||||
if (Input.IsActionJustPressed("shoot"))
|
||||
{
|
||||
//Debug.WriteLine("Shoot");
|
||||
Bullet bullet = BulletScene.Instantiate<Bullet>();
|
||||
Owner.AddChild(bullet);
|
||||
bullet.Transform = Muzzle.GlobalTransform;
|
||||
bullet.Position = this.Position;
|
||||
bullet.SetDirection(this._facingDirection);
|
||||
|
||||
}
|
||||
if (!Input.IsActionJustPressed("shoot")) return;
|
||||
//Debug.WriteLine("Shoot");
|
||||
var bullet = BulletScene.Instantiate<Bullet>();
|
||||
Owner.AddChild(bullet);
|
||||
bullet.Transform = Muzzle.GlobalTransform;
|
||||
bullet.Position = this.Position;
|
||||
bullet.SetDirection(this._facingDirection);
|
||||
}
|
||||
|
||||
private void SetAnimation()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue