2023-08-23 07:24:31 +00:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using Sirenix.OdinInspector;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
// ReSharper disable once CheckNamespace
|
|
|
|
namespace BlueWaterProject
|
|
|
|
{
|
|
|
|
[Serializable]
|
2023-09-12 14:46:57 +00:00
|
|
|
public class EnemyUnitStat : IIdx
|
2023-08-23 07:24:31 +00:00
|
|
|
{
|
2023-08-28 19:52:23 +00:00
|
|
|
#region Property and variable
|
|
|
|
|
|
|
|
[field: Tooltip("고유 인덱스")]
|
|
|
|
[field: SerializeField] public string Idx { get; set; }
|
|
|
|
|
|
|
|
[field: Tooltip("선장의 인덱스")]
|
|
|
|
[field: SerializeField] public string CaptainStatIdx { get; set; }
|
|
|
|
|
|
|
|
[field: Tooltip("선원의 인덱스")]
|
|
|
|
[field: SerializeField] public string SailorStatIdx { get; set; }
|
|
|
|
|
|
|
|
[field: Tooltip("부대의 이름 또는 선장의 이름")]
|
2023-08-23 07:24:31 +00:00
|
|
|
[field: SerializeField] public string UnitName { get; set; }
|
|
|
|
|
2023-08-28 19:52:23 +00:00
|
|
|
[field: Tooltip("선원의 수")]
|
|
|
|
[field: Range(0, GlobalValue.ONE_UNIT_CAPACITY - 1)]
|
|
|
|
[field: SerializeField] public int SailorCount { get; set; }
|
2023-08-30 02:10:16 +00:00
|
|
|
|
2023-09-04 07:31:04 +00:00
|
|
|
[field: EnumToggleButtons]
|
|
|
|
[field: SerializeField] public EAttackerType AttackerType { get; set; }
|
2023-08-30 02:10:16 +00:00
|
|
|
|
2023-09-04 07:31:04 +00:00
|
|
|
[field: EnumToggleButtons]
|
|
|
|
[field: SerializeField] public EOffenseType OffenseType { get; set; }
|
2023-08-30 02:10:16 +00:00
|
|
|
|
2023-09-04 07:31:04 +00:00
|
|
|
[field: EnumToggleButtons]
|
|
|
|
[field: SerializeField] public EDefenseType DefenseType { get; set; }
|
2023-08-23 07:24:31 +00:00
|
|
|
|
|
|
|
[field: Tooltip("부대 병력 리스트")]
|
2023-09-13 07:05:21 +00:00
|
|
|
[field: SerializeField] public List<EnemyAi> EnemyAiList { get; set; }
|
2023-08-28 19:52:23 +00:00
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region Constructor
|
2023-08-23 07:24:31 +00:00
|
|
|
|
2023-09-12 14:46:57 +00:00
|
|
|
public EnemyUnitStat()
|
2023-08-23 07:24:31 +00:00
|
|
|
{
|
2023-08-28 19:52:23 +00:00
|
|
|
Idx = null;
|
|
|
|
CaptainStatIdx = null;
|
|
|
|
SailorStatIdx = null;
|
2023-08-23 07:24:31 +00:00
|
|
|
UnitName = null;
|
2023-08-28 19:52:23 +00:00
|
|
|
SailorCount = 0;
|
2023-09-04 07:31:04 +00:00
|
|
|
AttackerType = EAttackerType.NONE;
|
|
|
|
OffenseType = EOffenseType.NONE;
|
|
|
|
DefenseType = EDefenseType.NONE;
|
2023-09-13 07:05:21 +00:00
|
|
|
EnemyAiList = new List<EnemyAi>(GlobalValue.ONE_UNIT_CAPACITY);
|
2023-08-28 19:52:23 +00:00
|
|
|
}
|
|
|
|
|
2023-09-12 14:46:57 +00:00
|
|
|
public EnemyUnitStat(string idx, string captainIdx, string sailorIdx, string unitName,
|
2023-09-13 07:05:21 +00:00
|
|
|
int sailorCount, EAttackerType attackerType, EOffenseType offenseType, EDefenseType defenseType, List<EnemyAi> enemyAiList)
|
2023-08-28 19:52:23 +00:00
|
|
|
{
|
|
|
|
Idx = idx;
|
|
|
|
CaptainStatIdx = captainIdx;
|
|
|
|
SailorStatIdx = sailorIdx;
|
|
|
|
UnitName = unitName;
|
|
|
|
SailorCount = sailorCount;
|
|
|
|
OffenseType = offenseType;
|
|
|
|
DefenseType = defenseType;
|
2023-09-13 07:05:21 +00:00
|
|
|
EnemyAiList = enemyAiList;
|
2023-09-04 07:31:04 +00:00
|
|
|
|
|
|
|
if (AttackerType == EAttackerType.NONE) return;
|
|
|
|
|
|
|
|
AttackerType = attackerType;
|
2023-08-23 07:24:31 +00:00
|
|
|
}
|
|
|
|
|
2023-09-12 14:46:57 +00:00
|
|
|
public EnemyUnitStat(EnemyUnitStat enemyUnitStat)
|
2023-08-23 07:24:31 +00:00
|
|
|
{
|
2023-09-12 14:46:57 +00:00
|
|
|
Idx = enemyUnitStat.Idx;
|
|
|
|
CaptainStatIdx = enemyUnitStat.CaptainStatIdx;
|
|
|
|
SailorStatIdx = enemyUnitStat.SailorStatIdx;
|
|
|
|
UnitName = enemyUnitStat.UnitName;
|
|
|
|
SailorCount = enemyUnitStat.SailorCount;
|
|
|
|
AttackerType = enemyUnitStat.AttackerType;
|
|
|
|
OffenseType = enemyUnitStat.OffenseType;
|
|
|
|
DefenseType = enemyUnitStat.DefenseType;
|
2023-09-13 07:05:21 +00:00
|
|
|
EnemyAiList = enemyUnitStat.EnemyAiList;
|
2023-09-04 07:31:04 +00:00
|
|
|
}
|
2023-08-28 19:52:23 +00:00
|
|
|
|
|
|
|
#endregion
|
2023-08-23 07:24:31 +00:00
|
|
|
}
|
|
|
|
}
|