Directional spider bomb

This commit is contained in:
MaddoScientisto 2025-03-15 17:56:55 +01:00
commit 36e77adcd7
8 changed files with 44 additions and 6 deletions

View file

@ -13,6 +13,14 @@ public partial class PlayerFSMItemUseModule : ModuleBase<PlayerState, CharacterB
[Export]
public ActorResourceProvider Shield { get; set; }
[Export] private PlayerStorageModule _storageModule;
public Vector2 FacingDirection
{
get => _storageModule.FacingDirection;
private set => _storageModule.FacingDirection = value;
}
public bool Enabled { get; set; } = false;
public override void EnterState(PlayerState state)
@ -105,7 +113,8 @@ public partial class PlayerFSMItemUseModule : ModuleBase<PlayerState, CharacterB
var bulletData = item.WeaponData.MakeBullet(this.GlobalPosition);
bullet.Initialize(bulletData, GameManager.Instance);
bullet.SetDirection(FacingDirection);
bullet.RotateSpriteDegrees(-90);
//bullet.SetDirection(_facingDirection);
bullet.Speed = item.WeaponData.BulletData.BulletSpeed;