2025-02-09 23:20:49 +01:00
|
|
|
using Cirno.Scripts.Components;
|
|
|
|
|
using Godot;
|
|
|
|
|
using Godot.Collections;
|
|
|
|
|
|
|
|
|
|
namespace Cirno.Scripts.Resources;
|
|
|
|
|
|
|
|
|
|
[GlobalClass]
|
|
|
|
|
public partial class WeaponResource : Resource
|
|
|
|
|
{
|
|
|
|
|
[Export]
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
[Export]
|
|
|
|
|
public PackedScene BulletScene { get; set; }
|
|
|
|
|
|
|
|
|
|
[Export] public double RateOfFire = 0.4f;
|
|
|
|
|
|
|
|
|
|
[Export] public int BulletCapacity = 20;
|
|
|
|
|
|
|
|
|
|
[Export] public double ReloadTime = 1.0f;
|
|
|
|
|
|
|
|
|
|
[Export] public bool AutoReload = true;
|
|
|
|
|
|
|
|
|
|
[Export] public bool InfiniteAmmo = true;
|
|
|
|
|
|
|
|
|
|
[Export] public int BulletsPerShot = 1;
|
|
|
|
|
|
|
|
|
|
[Export] public float SpreadAngle = 0f;
|
|
|
|
|
[Export] public float RandomSpread = 0f;
|
|
|
|
|
|
|
|
|
|
#region Bullet spawn data
|
|
|
|
|
|
2025-02-11 11:50:45 +01:00
|
|
|
[Export] public string AmmoKey;
|
2025-02-09 23:20:49 +01:00
|
|
|
[Export] public float BulletSpeed = 100f;
|
|
|
|
|
[Export] public float BulletDamage = 1;
|
|
|
|
|
[Export] private float _rotationOffset = 0f;
|
|
|
|
|
[Export] private BulletOwner owner = BulletOwner.None;
|
|
|
|
|
[Export] private Resource _modifier;
|
|
|
|
|
[Export] private Array<Resource> _timeModifiers;
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
}
|