Redesign and reimplement inventory menu
Add jewels but no implementation yet (needed redesign of inventory menu to function correctly)
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
using Chickensoft.AutoInject;
|
||||
using Chickensoft.Collections;
|
||||
using Chickensoft.Introspection;
|
||||
using Chickensoft.Serialization;
|
||||
using Godot;
|
||||
using Zennysoft.Game.Abstractions;
|
||||
using Zennysoft.Game.Implementation;
|
||||
using Zennysoft.Game.Ma;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
@@ -11,13 +12,11 @@ public partial class Ammo : EquipableItem, IStackable
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
private int _count;
|
||||
|
||||
[Node] private Sprite3D _sprite { get; set; }
|
||||
|
||||
public void OnReady()
|
||||
{
|
||||
_count = Stats.InitialCount;
|
||||
Count = new AutoProp<int>(Stats.InitialCount);
|
||||
_sprite.Texture = Stats.Texture;
|
||||
}
|
||||
|
||||
@@ -37,8 +36,9 @@ public partial class Ammo : EquipableItem, IStackable
|
||||
public override Texture2D GetTexture() => Stats.Texture;
|
||||
|
||||
[Save("ammo_item_count")]
|
||||
public int Count { get => _count; }
|
||||
public void SetCount(int count) => _count = count;
|
||||
public AutoProp<int> Count { get; private set; }
|
||||
|
||||
public void SetCount(int count) => Count.OnNext(count);
|
||||
|
||||
[Save("ammo_element")]
|
||||
public ElementType AmmoElement => Stats.AmmoElement;
|
||||
|
||||
Reference in New Issue
Block a user