Files
GameJamDungeon/Zennysoft.Game.Ma/src/items/jewels/Jewel.cs

40 lines
914 B
C#

using Chickensoft.AutoInject;
using Chickensoft.Introspection;
using Chickensoft.Serialization;
using Godot;
using Zennysoft.Game.Ma;
using Zennysoft.Ma.Adapter;
[Meta(typeof(IAutoNode)), Id("jewel")]
public partial class Jewel : Node3D, IAugmentItem
{
public override void _Notification(int what) => this.Notify(what);
[Node] private Sprite3D _sprite { get; set; }
public void OnReady()
{
_sprite.Texture = Stats.Texture;
}
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 Texture2D GetTexture() => Stats.Texture;
[Export]
[Save("jewel_stats")]
public JewelStats Stats { get; set; } = new JewelStats();
public IAugmentType Augment { get; set; }
}