2023-08-02 07:45:11 +00:00
|
|
|
using System;
|
2023-08-15 20:36:04 +00:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using Sirenix.OdinInspector;
|
2023-08-02 07:45:11 +00:00
|
|
|
using UnityEngine;
|
2023-08-08 07:53:35 +00:00
|
|
|
using UnityEngine.AI;
|
2023-08-03 03:38:50 +00:00
|
|
|
using Random = UnityEngine.Random;
|
2023-08-02 07:45:11 +00:00
|
|
|
|
|
|
|
// ReSharper disable once CheckNamespace
|
2023-08-03 05:49:05 +00:00
|
|
|
namespace BlueWaterProject
|
2023-08-02 07:45:11 +00:00
|
|
|
{
|
2023-08-09 07:44:09 +00:00
|
|
|
public enum AttackerType
|
|
|
|
{
|
|
|
|
NONE,
|
|
|
|
PLAYER,
|
|
|
|
PIRATE,
|
|
|
|
ENEMY
|
|
|
|
}
|
|
|
|
|
2023-08-02 07:45:11 +00:00
|
|
|
[Serializable]
|
2023-08-15 23:34:55 +00:00
|
|
|
public abstract class AiController : MonoBehaviour, IDamageable, IFieldOfView, IAiMover
|
2023-08-02 07:45:11 +00:00
|
|
|
{
|
2023-08-03 03:38:50 +00:00
|
|
|
#region Property and variable
|
2023-08-02 07:45:11 +00:00
|
|
|
|
2023-08-15 23:34:55 +00:00
|
|
|
[Title("Skin")]
|
|
|
|
[Tooltip("SkinnedMeshRenderer, MeshRenderer의 Material을 모두 담고 있는 리스트")]
|
|
|
|
[SerializeField] protected List<Material> skinMaterialList = new(10);
|
|
|
|
|
|
|
|
[Tooltip("캐릭터 외곽선의 기본 색상")]
|
|
|
|
[SerializeField] protected Color defaultSkinColor = Color.black;
|
|
|
|
|
|
|
|
[Tooltip("캐릭터에 마우스 커서가 올라가 있을 때 색상")]
|
|
|
|
[SerializeField] protected Color mouseEnterHighlightSkinColor = Color.white;
|
|
|
|
|
|
|
|
[Tooltip("캐릭터가 선택되었을 때 색상")]
|
|
|
|
[SerializeField] protected Color selectedSkinColor = Color.blue;
|
|
|
|
|
2023-08-17 07:57:46 +00:00
|
|
|
[SerializeField] protected bool isAttacking;
|
|
|
|
[SerializeField] protected AttackerType attackerType;
|
|
|
|
private Vector3 commandedPos;
|
2023-08-08 07:53:35 +00:00
|
|
|
|
2023-08-03 05:32:17 +00:00
|
|
|
protected Animator aiAnimator;
|
2023-08-08 07:53:35 +00:00
|
|
|
protected NavMeshAgent navMeshAgent;
|
2023-08-17 07:57:46 +00:00
|
|
|
private UnitController myUnitController;
|
2023-08-15 20:36:04 +00:00
|
|
|
private UnitController mouseEnterUnitController;
|
|
|
|
private UnitSelection unitSelection;
|
2023-08-17 07:57:46 +00:00
|
|
|
private CapsuleCollider myCollider;
|
|
|
|
private CapsuleCollider hitBoxCollider;
|
2023-08-15 20:36:04 +00:00
|
|
|
|
2023-08-15 23:34:55 +00:00
|
|
|
private static readonly int SpeedHash = Animator.StringToHash("Speed");
|
|
|
|
protected static readonly int AttackHash = Animator.StringToHash("Attack");
|
|
|
|
private static readonly int DamageHash = Animator.StringToHash("TakeDamage");
|
|
|
|
private static readonly int DeathTypeHash = Animator.StringToHash("DeathType");
|
|
|
|
private static readonly int DeathHash = Animator.StringToHash("Death");
|
2023-08-17 02:56:45 +00:00
|
|
|
private static readonly int ShieldHash = Animator.StringToHash("Shield");
|
2023-08-15 23:34:55 +00:00
|
|
|
private static readonly int OutlineColorHash = Shader.PropertyToID("_OutlineColor");
|
2023-08-15 20:36:04 +00:00
|
|
|
|
|
|
|
private static readonly WaitForSeconds FindTargetWaitTime = new(0.5f);
|
2023-08-02 07:45:11 +00:00
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
2023-08-03 03:38:50 +00:00
|
|
|
#region abstract function
|
|
|
|
|
2023-08-03 05:32:17 +00:00
|
|
|
protected abstract void Attack();
|
2023-08-03 03:38:50 +00:00
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
2023-08-02 07:45:11 +00:00
|
|
|
#region Unity built-in function
|
|
|
|
|
2023-08-17 01:48:13 +00:00
|
|
|
#if UNITY_EDITOR
|
2023-08-15 20:36:04 +00:00
|
|
|
private void OnDrawGizmosSelected()
|
|
|
|
{
|
|
|
|
DrawGizmosInFieldOfView();
|
|
|
|
}
|
2023-08-17 01:48:13 +00:00
|
|
|
#endif
|
2023-08-15 20:36:04 +00:00
|
|
|
|
2023-08-03 08:00:14 +00:00
|
|
|
protected virtual void Awake()
|
2023-08-02 07:45:11 +00:00
|
|
|
{
|
2023-08-15 20:36:04 +00:00
|
|
|
FindMaterial();
|
2023-08-03 03:38:50 +00:00
|
|
|
aiAnimator = Utils.GetComponentAndAssert<Animator>(transform);
|
2023-08-08 07:53:35 +00:00
|
|
|
navMeshAgent = Utils.GetComponentAndAssert<NavMeshAgent>(transform);
|
2023-08-17 07:57:46 +00:00
|
|
|
myUnitController = Utils.GetComponentAndAssert<UnitController>(transform.parent);
|
|
|
|
myCollider = Utils.GetComponentAndAssert<CapsuleCollider>(transform);
|
|
|
|
hitBoxCollider = Utils.GetComponentAndAssert<CapsuleCollider>(transform.Find("HitBox"));
|
2023-08-09 07:44:09 +00:00
|
|
|
|
2023-08-15 20:36:04 +00:00
|
|
|
unitSelection = FindObjectOfType<UnitSelection>();
|
|
|
|
|
2023-08-09 07:44:09 +00:00
|
|
|
if (gameObject.layer == LayerMask.NameToLayer("Player"))
|
|
|
|
{
|
|
|
|
attackerType = AttackerType.PLAYER;
|
|
|
|
}
|
|
|
|
else if (gameObject.layer == LayerMask.NameToLayer("Pirate"))
|
|
|
|
{
|
|
|
|
attackerType = AttackerType.PIRATE;
|
|
|
|
}
|
|
|
|
else if (gameObject.layer == LayerMask.NameToLayer("Enemy"))
|
|
|
|
{
|
|
|
|
attackerType = AttackerType.ENEMY;
|
|
|
|
}
|
2023-08-02 07:45:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private void Start()
|
|
|
|
{
|
2023-08-03 03:38:50 +00:00
|
|
|
SetCurrentHp(AiStat.maxHp);
|
2023-08-15 20:36:04 +00:00
|
|
|
navMeshAgent.speed = AiStat.moveSpd;
|
|
|
|
|
|
|
|
StartCoroutine(nameof(FindTarget));
|
|
|
|
Attack();
|
2023-08-03 03:38:50 +00:00
|
|
|
}
|
|
|
|
|
2023-08-15 20:36:04 +00:00
|
|
|
private void FixedUpdate()
|
2023-08-08 07:53:35 +00:00
|
|
|
{
|
2023-08-15 20:36:04 +00:00
|
|
|
UpdateLookAtTarget();
|
2023-08-15 23:34:55 +00:00
|
|
|
UpdateMovement();
|
2023-08-15 20:36:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private void OnMouseEnter()
|
|
|
|
{
|
|
|
|
mouseEnterUnitController = gameObject.GetComponentInParent<UnitController>();
|
|
|
|
|
|
|
|
if (mouseEnterUnitController == unitSelection.SelectedUnitController) return;
|
|
|
|
|
|
|
|
foreach (var soldier in mouseEnterUnitController.unit.soldierList)
|
|
|
|
{
|
|
|
|
soldier.MouseEnterHighlight();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private void OnMouseExit()
|
|
|
|
{
|
|
|
|
if (!mouseEnterUnitController || mouseEnterUnitController == unitSelection.SelectedUnitController) return;
|
|
|
|
|
|
|
|
foreach (var soldier in mouseEnterUnitController.unit.soldierList)
|
|
|
|
{
|
|
|
|
soldier.ResetHighlight();
|
|
|
|
}
|
|
|
|
|
|
|
|
mouseEnterUnitController = null;
|
2023-08-08 07:53:35 +00:00
|
|
|
}
|
|
|
|
|
2023-08-03 03:38:50 +00:00
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region interface property and function
|
|
|
|
|
2023-08-15 20:36:04 +00:00
|
|
|
#region IAiStat
|
|
|
|
|
|
|
|
[field: Space(10f)]
|
|
|
|
[field: Title("AiStat")]
|
2023-08-03 03:38:50 +00:00
|
|
|
[field: SerializeField] public AiStat AiStat { get; set; } = new();
|
2023-08-15 20:36:04 +00:00
|
|
|
|
2023-08-09 07:44:09 +00:00
|
|
|
public float GetCurrentHp() => AiStat.currentHp;
|
|
|
|
|
2023-08-17 07:57:46 +00:00
|
|
|
public void TakeDamage(AiStat attacker, AiStat defender, Vector3? attackPos = null)
|
2023-08-03 03:38:50 +00:00
|
|
|
{
|
2023-08-17 07:57:46 +00:00
|
|
|
if (!TargetTransform && attackPos != null)
|
|
|
|
{
|
|
|
|
BeAttackedMovement((Vector3)attackPos);
|
|
|
|
}
|
|
|
|
|
2023-08-03 03:38:50 +00:00
|
|
|
// 회피 성공 체크
|
|
|
|
if (Random.Range(0, 100) < defender.avoidanceRate)
|
|
|
|
{
|
|
|
|
// TODO : 회피 처리
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
var finalDamage = Utils.CalcDamage(attacker, defender);
|
|
|
|
|
|
|
|
// 방패 막기 체크
|
|
|
|
if (finalDamage == 0f)
|
|
|
|
{
|
2023-08-17 02:56:45 +00:00
|
|
|
aiAnimator.SetTrigger(ShieldHash);
|
2023-08-03 03:38:50 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
var changeHp = Mathf.Max(defender.currentHp - finalDamage, 0);
|
|
|
|
SetCurrentHp(changeHp);
|
|
|
|
|
|
|
|
// 죽었는지 체크
|
|
|
|
if (changeHp == 0f)
|
|
|
|
{
|
2023-08-17 07:57:46 +00:00
|
|
|
myCollider.enabled = false;
|
|
|
|
hitBoxCollider.enabled = false;
|
|
|
|
navMeshAgent.isStopped = true;
|
|
|
|
navMeshAgent.velocity = Vector3.zero;
|
|
|
|
|
2023-08-08 07:53:35 +00:00
|
|
|
var randomValue = Random.Range(0, 2);
|
|
|
|
aiAnimator.SetInteger(DeathTypeHash, randomValue);
|
|
|
|
|
2023-08-03 03:38:50 +00:00
|
|
|
// TODO : 죽었을 때 처리(죽는 애니메이션 이후 사라지는 효과 등)
|
|
|
|
aiAnimator.SetTrigger(DeathHash);
|
2023-08-08 07:53:35 +00:00
|
|
|
|
2023-08-17 07:57:46 +00:00
|
|
|
Invoke(nameof(DestroyObject), 3f);
|
2023-08-03 03:38:50 +00:00
|
|
|
return;
|
|
|
|
}
|
2023-08-02 07:45:11 +00:00
|
|
|
|
2023-08-03 03:38:50 +00:00
|
|
|
aiAnimator.SetTrigger(DamageHash);
|
2023-08-02 07:45:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
2023-08-15 20:36:04 +00:00
|
|
|
#region IFieldOfView
|
|
|
|
|
|
|
|
[field: Space(10f)]
|
|
|
|
[field: Title("FieldOfView")]
|
|
|
|
[field: SerializeField] public bool IsDrawGizmosInFieldOfView { get; set; } = true;
|
|
|
|
|
|
|
|
[field: SerializeField] public LayerMask TargetLayer { get; set; }
|
|
|
|
|
|
|
|
[field: SerializeField] public float ViewRadius { get; set; }
|
|
|
|
|
|
|
|
[field: SerializeField] public Collider[] ColliderWithinRange { get; set; } = new Collider[TARGET_MAX_SIZE];
|
|
|
|
|
2023-08-17 07:57:46 +00:00
|
|
|
//[field: SerializeField] public List<TargetInfo> TargetInfoList { get; set; } = new(TARGET_MAX_SIZE);
|
2023-08-15 20:36:04 +00:00
|
|
|
|
|
|
|
[field: SerializeField] public IAiStat IaiStat { get; set; }
|
|
|
|
|
2023-08-17 07:57:46 +00:00
|
|
|
[field: SerializeField] public Transform TargetTransform { get; set; }
|
|
|
|
|
|
|
|
//[field: SerializeField] public TargetInfo TargetInfo { get; set; } = new();
|
2023-08-15 20:36:04 +00:00
|
|
|
|
|
|
|
private const int TARGET_MAX_SIZE = 30;
|
2023-08-17 01:48:13 +00:00
|
|
|
|
2023-08-15 20:36:04 +00:00
|
|
|
public void DrawGizmosInFieldOfView()
|
|
|
|
{
|
|
|
|
if (!IsDrawGizmosInFieldOfView) return;
|
|
|
|
|
|
|
|
var myPos = transform.position;
|
|
|
|
|
|
|
|
Gizmos.color = Color.green;
|
|
|
|
Gizmos.DrawWireSphere(myPos, ViewRadius);
|
|
|
|
|
2023-08-17 07:57:46 +00:00
|
|
|
if (!TargetTransform) return;
|
2023-08-15 20:36:04 +00:00
|
|
|
|
2023-08-17 07:57:46 +00:00
|
|
|
Debug.DrawLine(myPos, TargetTransform.position, Color.red);
|
2023-08-15 20:36:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public IEnumerator FindTarget()
|
|
|
|
{
|
|
|
|
while (true)
|
|
|
|
{
|
|
|
|
Array.Clear(ColliderWithinRange, 0, TARGET_MAX_SIZE);
|
|
|
|
|
|
|
|
var myPos = transform.position;
|
|
|
|
var maxColliderCount = Physics.OverlapSphereNonAlloc(myPos, ViewRadius, ColliderWithinRange,
|
|
|
|
TargetLayer, QueryTriggerInteraction.Collide);
|
|
|
|
|
|
|
|
if (maxColliderCount <= 0)
|
|
|
|
{
|
2023-08-17 07:57:46 +00:00
|
|
|
TargetTransform = null;
|
2023-08-15 20:36:04 +00:00
|
|
|
yield return FindTargetWaitTime;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2023-08-17 07:57:46 +00:00
|
|
|
var nearestDistance = Mathf.Infinity;
|
|
|
|
Transform nearestTargetTransform = null;
|
|
|
|
|
2023-08-15 20:36:04 +00:00
|
|
|
for (var i = 0; i < maxColliderCount; i++)
|
|
|
|
{
|
2023-08-17 07:57:46 +00:00
|
|
|
var distanceToTarget = Vector3.Distance(transform.position, ColliderWithinRange[i].transform.position);
|
2023-08-15 20:36:04 +00:00
|
|
|
|
2023-08-17 07:57:46 +00:00
|
|
|
if (distanceToTarget >= nearestDistance) continue;
|
|
|
|
|
|
|
|
nearestDistance = distanceToTarget;
|
|
|
|
nearestTargetTransform = ColliderWithinRange[i].transform;
|
2023-08-15 20:36:04 +00:00
|
|
|
}
|
|
|
|
|
2023-08-17 07:57:46 +00:00
|
|
|
TargetTransform = nearestTargetTransform;
|
2023-08-15 20:36:04 +00:00
|
|
|
|
|
|
|
yield return FindTargetWaitTime;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public void UpdateLookAtTarget()
|
|
|
|
{
|
2023-08-17 07:57:46 +00:00
|
|
|
if (TargetTransform)
|
2023-08-15 20:36:04 +00:00
|
|
|
{
|
|
|
|
navMeshAgent.updateRotation = false;
|
|
|
|
|
2023-08-17 07:57:46 +00:00
|
|
|
var targetPos = TargetTransform.position;
|
2023-08-15 20:36:04 +00:00
|
|
|
targetPos.y = transform.position.y;
|
|
|
|
transform.LookAt(targetPos);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
navMeshAgent.updateRotation = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
2023-08-15 23:34:55 +00:00
|
|
|
#region IAiMover
|
|
|
|
|
|
|
|
[field: Space(10f)]
|
2023-08-16 05:40:33 +00:00
|
|
|
[field: Title("AiMover")]
|
2023-08-17 07:57:46 +00:00
|
|
|
[field: SerializeField] public MoveType AttackMoveType { get; set; }
|
|
|
|
|
|
|
|
[field: SerializeField] public MoveType BeAttackedMoveType { get; set; }
|
2023-08-15 23:34:55 +00:00
|
|
|
|
|
|
|
[field: SerializeField] public bool IsCommanded { get; set; }
|
|
|
|
|
|
|
|
public void UpdateMovement()
|
|
|
|
{
|
2023-08-16 05:40:33 +00:00
|
|
|
aiAnimator.SetFloat(SpeedHash, navMeshAgent.velocity.normalized.magnitude);
|
2023-08-15 23:34:55 +00:00
|
|
|
|
2023-08-17 07:57:46 +00:00
|
|
|
if (IsCommanded)
|
2023-08-15 23:34:55 +00:00
|
|
|
{
|
2023-08-17 07:57:46 +00:00
|
|
|
if (navMeshAgent.destination == commandedPos)
|
|
|
|
{
|
|
|
|
if (navMeshAgent.remainingDistance <= navMeshAgent.stoppingDistance)
|
|
|
|
{
|
|
|
|
IsCommanded = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (isAttacking) return;
|
2023-08-15 23:34:55 +00:00
|
|
|
|
2023-08-17 07:57:46 +00:00
|
|
|
navMeshAgent.SetDestination(commandedPos);
|
|
|
|
}
|
2023-08-15 23:34:55 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2023-08-17 07:57:46 +00:00
|
|
|
if (!TargetTransform) return;
|
|
|
|
|
|
|
|
switch (AttackMoveType)
|
|
|
|
{
|
|
|
|
case MoveType.NONE:
|
|
|
|
break;
|
|
|
|
case MoveType.FIXED:
|
|
|
|
break;
|
|
|
|
case MoveType.MOVE:
|
|
|
|
if (Vector3.Distance(transform.position, TargetTransform.position) > AiStat.atkRange)
|
|
|
|
{
|
|
|
|
navMeshAgent.SetDestination(TargetTransform.position);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
throw new ArgumentOutOfRangeException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public void BeAttackedMovement(Vector3 attackPos)
|
|
|
|
{
|
|
|
|
if (TargetTransform) return;
|
|
|
|
|
|
|
|
switch (BeAttackedMoveType)
|
|
|
|
{
|
|
|
|
case MoveType.NONE:
|
|
|
|
break;
|
|
|
|
case MoveType.FIXED:
|
|
|
|
break;
|
|
|
|
case MoveType.MOVE:
|
|
|
|
if (Vector3.Distance(transform.position, attackPos) > AiStat.atkRange)
|
|
|
|
{
|
|
|
|
myUnitController.MoveCommand(attackPos);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
throw new ArgumentOutOfRangeException();
|
2023-08-15 23:34:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public void MoveTarget(Vector3 targetPos)
|
|
|
|
{
|
|
|
|
IsCommanded = true;
|
2023-08-17 07:57:46 +00:00
|
|
|
commandedPos = targetPos;
|
2023-08-15 23:34:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
2023-08-15 20:36:04 +00:00
|
|
|
#endregion
|
|
|
|
|
2023-08-03 08:00:14 +00:00
|
|
|
#region Custom function
|
2023-08-15 23:34:55 +00:00
|
|
|
|
2023-08-15 20:36:04 +00:00
|
|
|
private void FindMaterial()
|
|
|
|
{
|
|
|
|
var skinnedMeshRenderers = GetComponentsInChildren<SkinnedMeshRenderer>();
|
|
|
|
var meshRenderers = GetComponentsInChildren<MeshRenderer>();
|
|
|
|
|
|
|
|
foreach (var skin in skinnedMeshRenderers)
|
|
|
|
{
|
|
|
|
if (!skin.gameObject.activeSelf) continue;
|
|
|
|
|
2023-08-15 23:34:55 +00:00
|
|
|
skinMaterialList.Add(skin.material);
|
2023-08-15 20:36:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
foreach (var skin in meshRenderers)
|
|
|
|
{
|
|
|
|
if (!skin.gameObject.activeSelf) continue;
|
|
|
|
|
2023-08-15 23:34:55 +00:00
|
|
|
skinMaterialList.Add(skin.material);
|
2023-08-15 20:36:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-15 23:34:55 +00:00
|
|
|
private void SetOutlineColor(Color color)
|
2023-08-15 20:36:04 +00:00
|
|
|
{
|
2023-08-15 23:34:55 +00:00
|
|
|
foreach (var skin in skinMaterialList)
|
2023-08-15 20:36:04 +00:00
|
|
|
{
|
2023-08-15 23:34:55 +00:00
|
|
|
skin.SetColor(OutlineColorHash, color);
|
2023-08-15 20:36:04 +00:00
|
|
|
}
|
|
|
|
}
|
2023-08-15 23:34:55 +00:00
|
|
|
|
2023-08-17 07:57:46 +00:00
|
|
|
public void ResetHighlight() => SetOutlineColor(defaultSkinColor);
|
|
|
|
public void MouseEnterHighlight() => SetOutlineColor(mouseEnterHighlightSkinColor);
|
|
|
|
public void SelectedHighlight() => SetOutlineColor(selectedSkinColor);
|
2023-08-15 20:36:04 +00:00
|
|
|
private void DestroyObject() => Destroy(gameObject);
|
2023-08-17 07:57:46 +00:00
|
|
|
public void OnAttacking(int boolValue) => isAttacking = boolValue == 1;
|
2023-08-08 07:53:35 +00:00
|
|
|
public NavMeshAgent GetNavMeshAgent() => navMeshAgent;
|
|
|
|
public Animator GetAnimator() => aiAnimator;
|
2023-08-02 07:45:11 +00:00
|
|
|
public void SetCurrentHp(float value) => AiStat.currentHp = value;
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|