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

27 lines
596 B
C#
Raw Normal View History

2023-10-20 22:46:14 +08:00
using System;
using System.Collections;
using System.Collections.Generic;
using BITKit;
using UnityEngine;
namespace BITFALL.Items.Armor
{
[Serializable]
2024-03-31 23:34:22 +08:00
[CustomType(typeof(ICount))]
public struct AsArmor:IProperty,ICount
2023-10-20 22:46:14 +08:00
{
2024-03-31 23:34:22 +08:00
public int CurrentPoint;
public int MaxPoint;
public bool IsDamaged=>CurrentPoint<MaxPoint;
public override string ToString()=>$"{CurrentPoint}/{MaxPoint}";
public int Count => CurrentPoint;
2023-10-20 22:46:14 +08:00
}
public class AssetableArmor : AssetableItem
{
[Header(nameof(AssetableArmor))]
2024-03-31 23:34:22 +08:00
[SerializeField] private int capacity;
public int Capacity=>capacity;
2023-10-20 22:46:14 +08:00
}
}