Fix texture stuff
This commit is contained in:
@@ -1,30 +1,36 @@
|
||||
using Chickensoft.AutoInject;
|
||||
using Chickensoft.Introspection;
|
||||
using Chickensoft.Serialization;
|
||||
using Godot;
|
||||
using Zennysoft.Ma.Godot.Adapter;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
|
||||
[Meta, Id("armor")]
|
||||
[Meta(typeof(IAutoNode)), Id("armor")]
|
||||
public partial class Armor : EquipableItem
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
[Node] private Sprite3D Sprite { get; set; } = default!;
|
||||
|
||||
public override string ItemName => Stats.Name;
|
||||
|
||||
public override string Description => Stats.Description;
|
||||
|
||||
public override float SpawnRate => Stats.SpawnRate;
|
||||
|
||||
public override double ThrowDamage => Stats.ThrowDamage;
|
||||
|
||||
public override float ThrowSpeed => Stats.ThrowSpeed;
|
||||
|
||||
public int Defense => Stats.Defense;
|
||||
|
||||
public void IncreaseArmorDefense(int bonus) => Stats.Defense += bonus;
|
||||
|
||||
public override ItemTag ItemTag => Stats.ItemTag;
|
||||
|
||||
[Export]
|
||||
private ArmorStats _armorStats { get; set; } = new ArmorStats();
|
||||
|
||||
public override string ItemName => _armorStats.Name;
|
||||
|
||||
public override string Description => _armorStats.Description;
|
||||
|
||||
public override float SpawnRate => _armorStats.SpawnRate;
|
||||
|
||||
public override double ThrowDamage => _armorStats.ThrowDamage;
|
||||
|
||||
public override float ThrowSpeed => _armorStats.ThrowSpeed;
|
||||
|
||||
public int Defense => _armorStats.Defense;
|
||||
|
||||
public void IncreaseArmorDefense(int bonus) => _armorStats.Defense += bonus;
|
||||
|
||||
public override ItemTag ItemTag => _armorStats.ItemTag;
|
||||
|
||||
public override InventoryItemStats ItemStats { get => _armorStats; set => _armorStats = (ArmorStats)value; }
|
||||
[Save("armor_stats")]
|
||||
public ArmorStats Stats { get; set; } = new ArmorStats();
|
||||
public override Texture2D GetTexture() => Stats.Texture;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user