BITFALL/Assets/Artists/Scripts/Item/AssetableArmor.cs

27 lines
596 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using BITKit;
using UnityEngine;
namespace BITFALL.Items.Armor
{
[Serializable]
[CustomType(typeof(ICount))]
public struct AsArmor:IProperty,ICount
{
public int CurrentPoint;
public int MaxPoint;
public bool IsDamaged=>CurrentPoint<MaxPoint;
public override string ToString()=>$"{CurrentPoint}/{MaxPoint}";
public int Count => CurrentPoint;
}
public class AssetableArmor : AssetableItem
{
[Header(nameof(AssetableArmor))]
[SerializeField] private int capacity;
public int Capacity=>capacity;
}
}