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
|
|
|
}
|
2024-04-06 16:33:57 +08:00
|
|
|
public class ScriptableArmor : ScriptableItem
|
2023-10-20 22:46:14 +08:00
|
|
|
{
|
2024-04-06 16:33:57 +08:00
|
|
|
[Header(nameof(ScriptableArmor))]
|
2024-03-31 23:34:22 +08:00
|
|
|
[SerializeField] private int capacity;
|
|
|
|
public int Capacity=>capacity;
|
2023-10-20 22:46:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|