Added resources to bullets

This commit is contained in:
Marco 2025-02-20 17:43:05 +01:00
commit 28671c098b
11 changed files with 329 additions and 24 deletions

View file

@ -13,6 +13,7 @@ public partial class BulletResource : Resource
public PackedScene BulletScene { get; set; }
[Export] public PackedScene DestructionParticlesScene { get; set; }
[Export] public float BulletSpeed = 100f;
[Export] public Vector2 Direction = Vector2.Right;
[Export] public float BulletDamage = 1;
[Export] public float LifeTime = 10f;
[Export] public bool DestroyOnCollision = true;
@ -28,7 +29,7 @@ public partial class BulletResource : Resource
return new BulletInfo()
{
Position = position,
Direction = Vector2.Right,
Direction = Direction,
Speed = BulletSpeed,
Owner = Owner,
DamageType = DamageType,