39 lines
918 B
C#
39 lines
918 B
C#
using Chickensoft.AutoInject;
|
|
using Chickensoft.Introspection;
|
|
using Chickensoft.Serialization;
|
|
using Godot;
|
|
using Zennysoft.Game.Ma;
|
|
using Zennysoft.Ma.Adapter;
|
|
using Zennysoft.Ma.Adapter.Entity;
|
|
|
|
[Meta(typeof(IAutoNode))]
|
|
public partial class Plastique : Node3D, IBaseInventoryItem
|
|
{
|
|
public override void _Notification(int what) => this.Notify(what);
|
|
|
|
[Node] private Sprite3D _sprite { get; set; }
|
|
|
|
public string ItemName => Stats.Name;
|
|
|
|
public string Description => Stats.Description;
|
|
|
|
public float SpawnRate => Stats.SpawnRate;
|
|
|
|
public int ThrowDamage => Stats.ThrowDamage;
|
|
|
|
public float ThrowSpeed => Stats.ThrowSpeed;
|
|
|
|
public ItemTag ItemTag => Stats.ItemTag;
|
|
|
|
public void OnResolved()
|
|
{
|
|
_sprite.Texture = Stats.Texture;
|
|
}
|
|
|
|
public Texture2D GetTexture() => Stats.Texture;
|
|
|
|
[Export]
|
|
[Save("inventory_stats")]
|
|
public EffectItemStats Stats { get; set; } = new EffectItemStats();
|
|
}
|