Files
GameJamDungeon/src/items/throwable/ThrowableItem.cs

38 lines
1.2 KiB
C#

using Chickensoft.Introspection;
using Godot;
namespace GameJamDungeon;
[Meta, Id("throwable_item")]
public partial class ThrowableItem : InventoryItem
{
[Export]
private ThrowableItemStats _throwableItemStats { get; set; }
public override string ItemName => _throwableItemStats.Name;
public override string Description => _throwableItemStats.Description;
public override float SpawnRate => _throwableItemStats.SpawnRate;
public override double ThrowDamage => _throwableItemStats.ThrowDamage;
public override float ThrowSpeed => _throwableItemStats.ThrowSpeed;
public ElementType ElementType => _throwableItemStats.ElementType;
public ThrowableItemTag ThrowableItemTag => _throwableItemStats.ThrowableItemTag;
public int HealHPAmount => _throwableItemStats.HealHPAmount;
public int HealVTAmount => _throwableItemStats.HealVTAmount;
public void SetElementType(ElementType elementType) => _throwableItemStats.ElementType = elementType;
public void SetDescription(string description) => _throwableItemStats.Description = description;
public int Count { get; }
public override InventoryItemStats ItemStats { get => _throwableItemStats; set => _throwableItemStats = (ThrowableItemStats)value; }
}