Redesign and reimplement inventory menu
Add jewels but no implementation yet (needed redesign of inventory menu to function correctly)
This commit is contained in:
37
Zennysoft.Game.Ma/src/items/jewels/Jewel.cs
Normal file
37
Zennysoft.Game.Ma/src/items/jewels/Jewel.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
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 : InventoryItem
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
[Node] private Sprite3D _sprite { get; set; }
|
||||
|
||||
public void OnReady()
|
||||
{
|
||||
_sprite.Texture = Stats.Texture;
|
||||
}
|
||||
|
||||
public override string ItemName => Stats.Name;
|
||||
|
||||
public override string Description => Stats.Description;
|
||||
|
||||
public override float SpawnRate => Stats.SpawnRate;
|
||||
|
||||
public override int ThrowDamage => Stats.ThrowDamage;
|
||||
|
||||
public override float ThrowSpeed => Stats.ThrowSpeed;
|
||||
|
||||
public override ItemTag ItemTag => Stats.ItemTag;
|
||||
|
||||
public override Texture2D GetTexture() => Stats.Texture;
|
||||
|
||||
[Export]
|
||||
[Save("jewel_stats")]
|
||||
public JewelStats Stats { get; set; } = new JewelStats();
|
||||
}
|
||||
Reference in New Issue
Block a user