Ai 전체 구조 변경 중2
This commit is contained in:
parent
fd050c4f68
commit
e534106cde
@ -6737,7 +6737,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_004
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_004
|
||||
<UnitType>k__BackingField: 3
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 2
|
||||
@ -11292,7 +11291,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_004
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_004
|
||||
<UnitType>k__BackingField: 3
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 2
|
||||
@ -12059,7 +12057,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_005
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_005
|
||||
<UnitType>k__BackingField: 4
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 0
|
||||
@ -34191,7 +34188,7 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 91032034}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0.019106599, y: 0.49953982, z: 0.011021242, w: 0.8660101}
|
||||
m_LocalRotation: {x: -0.019106599, y: 0.4995399, z: 0.011021243, w: 0.86601007}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
@ -34291,7 +34288,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_005
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_005
|
||||
<UnitType>k__BackingField: 4
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 0
|
||||
@ -39118,7 +39114,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_004
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_004
|
||||
<UnitType>k__BackingField: 3
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 2
|
||||
@ -40671,13 +40666,17 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_persistent: 0
|
||||
<AiViewDataSo>k__BackingField: {fileID: 11400000, guid: ae7ec952e14cea8499afd4a7b8ee8dfb,
|
||||
<EnemyViewDataSo>k__BackingField: {fileID: 11400000, guid: d4ed8ebcf48bbdb4d84caf4a4cab7c04,
|
||||
type: 2}
|
||||
<AiStatDataSo>k__BackingField: {fileID: 11400000, guid: 45c7e0b53956de746a37c2e34cb2eb14,
|
||||
<PirateViewDataSo>k__BackingField: {fileID: 11400000, guid: 33ac25d6eca8f6447a342dfb44a2a282,
|
||||
type: 2}
|
||||
<UnitDataSo>k__BackingField: {fileID: 11400000, guid: a017fce7d59b4fc4cb88332a7854eef3,
|
||||
<EnemyStatDataSo>k__BackingField: {fileID: 11400000, guid: c19ae12d221eae64f90d58e15a04d592,
|
||||
type: 2}
|
||||
<EnemyUnitDataSo>k__BackingField: {fileID: 11400000, guid: d363ca1023ab0754489bda2d69d79564,
|
||||
<PirateStatDataSo>k__BackingField: {fileID: 11400000, guid: 0f0ed8929be00534e97398bb55d8c541,
|
||||
type: 2}
|
||||
<EnemyUnitStatDataSo>k__BackingField: {fileID: 11400000, guid: d363ca1023ab0754489bda2d69d79564,
|
||||
type: 2}
|
||||
<PirateUnitDataSo>k__BackingField: {fileID: 11400000, guid: 6cd374040492d94498f1cce6c3a10e14,
|
||||
type: 2}
|
||||
<CardDataSo>k__BackingField: {fileID: 11400000, guid: 0db3b35c9121e9e4bbe8559a0922145f,
|
||||
type: 2}
|
||||
@ -61164,7 +61163,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_captain_e_005
|
||||
<ViewIdx>k__BackingField: ai_view_captain_e_005
|
||||
<UnitType>k__BackingField: 4
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 0
|
||||
@ -64637,7 +64635,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_001
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_001
|
||||
<UnitType>k__BackingField: 0
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 3
|
||||
@ -91007,7 +91004,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_004
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_004
|
||||
<UnitType>k__BackingField: 3
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 2
|
||||
@ -205784,7 +205780,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_005
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_005
|
||||
<UnitType>k__BackingField: 4
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 0
|
||||
@ -231986,7 +231981,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_005
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_005
|
||||
<UnitType>k__BackingField: 4
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 0
|
||||
@ -249098,7 +249092,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_004
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_004
|
||||
<UnitType>k__BackingField: 3
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 2
|
||||
@ -291043,7 +291036,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_004
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_004
|
||||
<UnitType>k__BackingField: 3
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 2
|
||||
@ -293160,7 +293152,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_004
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_004
|
||||
<UnitType>k__BackingField: 3
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 2
|
||||
@ -359017,7 +359008,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_005
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_005
|
||||
<UnitType>k__BackingField: 4
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 0
|
||||
@ -385624,7 +385614,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_captain_e_004
|
||||
<ViewIdx>k__BackingField: ai_view_captain_e_004
|
||||
<UnitType>k__BackingField: 3
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 2
|
||||
@ -460270,7 +460259,7 @@ MonoBehaviour:
|
||||
- {fileID: 9100000, guid: 9f0a9572ffcdefc49b34f61fb0a0f801, type: 2}
|
||||
- {fileID: 9100000, guid: aca0db2952a1e6e4d84c9551f29c5b3e, type: 2}
|
||||
- {fileID: 9100000, guid: 29cd6b82b1043b54791bb98058dac0da, type: 2}
|
||||
playerUnitList: []
|
||||
pirateUnitList: []
|
||||
--- !u!4 &1228753929
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -490346,7 +490335,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_004
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_004
|
||||
<UnitType>k__BackingField: 3
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 2
|
||||
@ -517352,7 +517340,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_001
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_001
|
||||
<UnitType>k__BackingField: 0
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 3
|
||||
@ -532129,7 +532116,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_001
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_001
|
||||
<UnitType>k__BackingField: 0
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 3
|
||||
@ -703229,7 +703215,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_001
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_001
|
||||
<UnitType>k__BackingField: 0
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 3
|
||||
@ -720255,7 +720240,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_005
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_005
|
||||
<UnitType>k__BackingField: 4
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 0
|
||||
@ -728100,7 +728084,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_004
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_004
|
||||
<UnitType>k__BackingField: 3
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 2
|
||||
@ -728797,7 +728780,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_005
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_005
|
||||
<UnitType>k__BackingField: 4
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 0
|
||||
@ -736229,7 +736211,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_001
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_001
|
||||
<UnitType>k__BackingField: 0
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 3
|
||||
@ -747152,7 +747133,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_captain_e_001
|
||||
<ViewIdx>k__BackingField: ai_view_captain_e_001
|
||||
<UnitType>k__BackingField: 0
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 3
|
||||
@ -774428,7 +774408,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_004
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_004
|
||||
<UnitType>k__BackingField: 3
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 2
|
||||
@ -790906,7 +790885,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_005
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_005
|
||||
<UnitType>k__BackingField: 4
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 0
|
||||
@ -793452,7 +793430,6 @@ MonoBehaviour:
|
||||
<Idx>k__BackingField: ai_stat_sailor_e_004
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_004
|
||||
<UnitType>k__BackingField: 3
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 2
|
||||
|
@ -44,7 +44,7 @@ namespace BlueWaterProject
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class AiController : MonoBehaviour, IDamageable, IFieldOfView, IAiMover
|
||||
public class AiController : MonoBehaviour, IDamageable
|
||||
{
|
||||
#region Property and variable
|
||||
|
||||
@ -79,8 +79,8 @@ namespace BlueWaterProject
|
||||
|
||||
protected Animator aiAnimator;
|
||||
protected NavMeshAgent navMeshAgent;
|
||||
private UnitController myUnitController;
|
||||
private UnitController mouseEnterUnitController;
|
||||
//private UnitController myUnitController;
|
||||
//private UnitController mouseEnterUnitController;
|
||||
private UnitSelection unitSelection;
|
||||
private CapsuleCollider myCollider;
|
||||
private LookAtConstraint lookAtConstraint;
|
||||
@ -98,7 +98,7 @@ namespace BlueWaterProject
|
||||
protected static readonly WaitForSeconds FindTargetWaitTime = new(0.5f);
|
||||
private static readonly WaitForSeconds CheckAgentArriveTime = new(0.1f);
|
||||
|
||||
private delegate AiView GetAiViewDataDelegate(string viewIdx);
|
||||
private delegate EnemyView GetAiViewDataDelegate(string viewIdx);
|
||||
|
||||
#endregion
|
||||
|
||||
@ -186,9 +186,9 @@ namespace BlueWaterProject
|
||||
//
|
||||
// if (mouseEnterUnitController == unitSelection.SelectedUnitController) return;
|
||||
//
|
||||
// foreach (var unit in mouseEnterUnitController.unit.UnitList)
|
||||
// foreach (var pirateUnitStat in mouseEnterUnitController.pirateUnitStat.UnitList)
|
||||
// {
|
||||
// unit.MouseEnterHighlight();
|
||||
// pirateUnitStat.MouseEnterHighlight();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
@ -197,9 +197,9 @@ namespace BlueWaterProject
|
||||
// if (AiStat.AiType == EAiType.ENEMY ||
|
||||
// !mouseEnterUnitController || mouseEnterUnitController == unitSelection.SelectedUnitController) return;
|
||||
//
|
||||
// foreach (var unit in mouseEnterUnitController.unit.UnitList)
|
||||
// foreach (var pirateUnitStat in mouseEnterUnitController.pirateUnitStat.UnitList)
|
||||
// {
|
||||
// unit.ResetHighlight();
|
||||
// pirateUnitStat.ResetHighlight();
|
||||
// }
|
||||
//
|
||||
// mouseEnterUnitController = null;
|
||||
@ -213,7 +213,7 @@ namespace BlueWaterProject
|
||||
|
||||
[field: Space(10f)]
|
||||
[field: Title("AiStat")]
|
||||
[field: SerializeField] public AiStat AiStat { get; set; } = new();
|
||||
[field: SerializeField] public EnemyStat AiStat { get; set; } = new();
|
||||
|
||||
public float GetCurrentHp() => AiStat.CurrentHp;
|
||||
public void SetCurrentHp(float value) => AiStat.CurrentHp = value;
|
||||
@ -555,7 +555,7 @@ namespace BlueWaterProject
|
||||
|
||||
aiAnimator = Utils.GetComponentAndAssert<Animator>(transform);
|
||||
navMeshAgent = Utils.GetComponentAndAssert<NavMeshAgent>(transform);
|
||||
myUnitController = Utils.GetComponentAndAssert<UnitController>(transform.parent);
|
||||
//myUnitController = Utils.GetComponentAndAssert<UnitController>(transform.parent);
|
||||
myCollider = Utils.GetComponentAndAssert<CapsuleCollider>(transform);
|
||||
lookAtConstraint = Utils.GetComponentAndAssert<LookAtConstraint>(flagContainer);
|
||||
hitBoxCollider = Utils.GetComponentAndAssert<CapsuleCollider>(transform.Find("HitBox"));
|
||||
@ -611,7 +611,7 @@ namespace BlueWaterProject
|
||||
closeWeapon.SetBoxCollider();
|
||||
}
|
||||
|
||||
private GetAiViewDataDelegate GetAiViewData(bool isEditor) => isEditor ? DataManager.Inst.GetAiViewSoKey : DataManager.Inst.GetAiViewDictionaryKey;
|
||||
private GetAiViewDataDelegate GetAiViewData(bool isEditor) => isEditor ? DataManager.Inst.GetEnemyViewSoFromKey : DataManager.Inst.GetEnemyViewDictionaryFromKey;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public void InitStartInEditor()
|
||||
|
@ -1,25 +1,25 @@
|
||||
using BehaviorDesigner.Runtime;
|
||||
using BehaviorDesigner.Runtime.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
[TaskCategory("Custom/Conditional")]
|
||||
public class CanAttackInOffense : Conditional
|
||||
{
|
||||
[RequiredField] public SharedAiStat aiStat;
|
||||
[RequiredField] public SharedIslandInfo islandInfo;
|
||||
[RequiredField] public SharedTransform targetTransform;
|
||||
|
||||
public override TaskStatus OnUpdate()
|
||||
{
|
||||
if (!targetTransform.Value || !islandInfo.Value.TargetAllList.Contains(targetTransform.Value)) return TaskStatus.Failure;
|
||||
|
||||
var targetToDistance = Vector3.Distance(targetTransform.Value.position, transform.position);
|
||||
var targetInAttackRange = targetToDistance <= aiStat.Value.AtkRange;
|
||||
|
||||
return targetInAttackRange ? TaskStatus.Success : TaskStatus.Failure;
|
||||
}
|
||||
}
|
||||
}
|
||||
// using BehaviorDesigner.Runtime;
|
||||
// using BehaviorDesigner.Runtime.Tasks;
|
||||
// using UnityEngine;
|
||||
//
|
||||
// // ReSharper disable once CheckNamespace
|
||||
// namespace BlueWaterProject
|
||||
// {
|
||||
// [TaskCategory("Custom/Conditional")]
|
||||
// public class CanAttackInOffense : Conditional
|
||||
// {
|
||||
// [RequiredField] public SharedAiStat aiStat;
|
||||
// [RequiredField] public SharedIslandInfo islandInfo;
|
||||
// [RequiredField] public SharedTransform targetTransform;
|
||||
//
|
||||
// public override TaskStatus OnUpdate()
|
||||
// {
|
||||
// if (!targetTransform.Value || !islandInfo.Value.TargetAllList.Contains(targetTransform.Value)) return TaskStatus.Failure;
|
||||
//
|
||||
// var targetToDistance = Vector3.Distance(targetTransform.Value.position, transform.position);
|
||||
// var targetInAttackRange = targetToDistance <= aiStat.Value.AtkRange;
|
||||
//
|
||||
// return targetInAttackRange ? TaskStatus.Success : TaskStatus.Failure;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
@ -1,158 +1,158 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using BehaviorDesigner.Runtime;
|
||||
using BehaviorDesigner.Runtime.Tasks;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AI;
|
||||
using Action = BehaviorDesigner.Runtime.Tasks.Action;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
[TaskCategory("Custom/Action")]
|
||||
public class FindTarget : Action
|
||||
{
|
||||
[Title("Common variable")]
|
||||
[RequiredField] public SharedAiStat aiStat;
|
||||
[RequiredField] public SharedNavMeshAgent navMeshAgent;
|
||||
[RequiredField] public SharedTransform targetTransform;
|
||||
|
||||
[Title("Offense Variable")]
|
||||
public SharedIslandInfo islandInfo;
|
||||
|
||||
[Title("Defense Variable")]
|
||||
public SharedVector3 defensePos;
|
||||
|
||||
private AiController aiController;
|
||||
private bool isFindTargetCoroutine;
|
||||
|
||||
private static readonly WaitForSeconds FindTargetWaitTime = new(0.5f);
|
||||
|
||||
public override void OnAwake()
|
||||
{
|
||||
aiController = GetComponent<AiController>();
|
||||
}
|
||||
|
||||
public override void OnStart()
|
||||
{
|
||||
switch (aiStat.Value.AttackerType)
|
||||
{
|
||||
case EAttackerType.NONE:
|
||||
Debug.Log("AiStat.AttackerType == NONE Error");
|
||||
break;
|
||||
case EAttackerType.OFFENSE:
|
||||
isFindTargetCoroutine = true;
|
||||
StartCoroutine(nameof(FindTargetInOffense));
|
||||
break;
|
||||
case EAttackerType.DEFENSE:
|
||||
isFindTargetCoroutine = true;
|
||||
StartCoroutine(nameof(FindTargetInDefense));
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
|
||||
public override TaskStatus OnUpdate()
|
||||
{
|
||||
return isFindTargetCoroutine ? TaskStatus.Running : TaskStatus.Success;
|
||||
}
|
||||
|
||||
public IEnumerator FindTargetInOffense()
|
||||
{
|
||||
switch (aiStat.Value.OffenseType)
|
||||
{
|
||||
case EOffenseType.NONE:
|
||||
Debug.Log("AiStat.OffenseType == NONE Error");
|
||||
break;
|
||||
case EOffenseType.NORMAL:
|
||||
if (islandInfo.Value.EnemyList.Count > 0)
|
||||
{
|
||||
aiController.SetNearestTargetInOffense(islandInfo.Value.EnemyList);
|
||||
}
|
||||
else if (islandInfo.Value.HouseList.Count > 0)
|
||||
{
|
||||
aiController.SetNearestTargetInOffense(islandInfo.Value.HouseList);
|
||||
}
|
||||
break;
|
||||
case EOffenseType.ONLY_HOUSE:
|
||||
if (navMeshAgent.Value.pathStatus == NavMeshPathStatus.PathPartial)
|
||||
{
|
||||
aiController.SetNearestTargetInOffense(islandInfo.Value.TargetAllList);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (islandInfo.Value.HouseList.Count > 0)
|
||||
{
|
||||
aiController.SetNearestTargetInOffense(islandInfo.Value.HouseList);
|
||||
}
|
||||
else if (islandInfo.Value.EnemyList.Count > 0)
|
||||
{
|
||||
aiController.SetNearestTargetInOffense(islandInfo.Value.EnemyList);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
if (targetTransform.Value && navMeshAgent.Value.enabled)
|
||||
{
|
||||
var distanceToTarget = Vector3.Distance(transform.position, targetTransform.Value.position);
|
||||
|
||||
navMeshAgent.Value.isStopped = distanceToTarget <= navMeshAgent.Value.stoppingDistance;
|
||||
if (distanceToTarget > navMeshAgent.Value.stoppingDistance)
|
||||
{
|
||||
navMeshAgent.Value.SetDestination(targetTransform.Value.position);
|
||||
}
|
||||
}
|
||||
|
||||
yield return FindTargetWaitTime;
|
||||
isFindTargetCoroutine = false;
|
||||
}
|
||||
|
||||
public IEnumerator FindTargetInDefense()
|
||||
{
|
||||
switch (aiStat.Value.DefenseType)
|
||||
{
|
||||
case EDefenseType.NONE:
|
||||
Debug.Log("AiStat.DefenseType == NONE Error");
|
||||
break;
|
||||
case EDefenseType.STRIKER:
|
||||
aiController.SetNearestTargetInDefense(transform.position, aiStat.Value.ViewRange);
|
||||
break;
|
||||
case EDefenseType.MIDFIELDER:
|
||||
aiController.SetNearestTargetInDefense(transform.position, aiStat.Value.ViewRange);
|
||||
break;
|
||||
case EDefenseType.DEFENDER:
|
||||
aiController.SetNearestTargetInDefense(defensePos.Value, aiStat.Value.DefenseRange);
|
||||
break;
|
||||
case EDefenseType.KEEPER:
|
||||
aiController.SetNearestTargetInDefense(transform.position, aiStat.Value.ViewRange);
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
if (targetTransform.Value && navMeshAgent.Value.enabled)
|
||||
{
|
||||
var distanceToTarget = Vector3.Distance(transform.position, targetTransform.Value.position);
|
||||
|
||||
navMeshAgent.Value.isStopped = distanceToTarget <= navMeshAgent.Value.stoppingDistance;
|
||||
if (distanceToTarget > navMeshAgent.Value.stoppingDistance)
|
||||
{
|
||||
navMeshAgent.Value.SetDestination(targetTransform.Value.position);
|
||||
}
|
||||
}
|
||||
|
||||
yield return FindTargetWaitTime;
|
||||
isFindTargetCoroutine = false;
|
||||
}
|
||||
|
||||
public override void OnEnd()
|
||||
{
|
||||
StopAllCoroutines();
|
||||
}
|
||||
}
|
||||
}
|
||||
// using System;
|
||||
// using System.Collections;
|
||||
// using BehaviorDesigner.Runtime;
|
||||
// using BehaviorDesigner.Runtime.Tasks;
|
||||
// using Sirenix.OdinInspector;
|
||||
// using UnityEngine;
|
||||
// using UnityEngine.AI;
|
||||
// using Action = BehaviorDesigner.Runtime.Tasks.Action;
|
||||
//
|
||||
// // ReSharper disable once CheckNamespace
|
||||
// namespace BlueWaterProject
|
||||
// {
|
||||
// [TaskCategory("Custom/Action")]
|
||||
// public class FindTarget : Action
|
||||
// {
|
||||
// [Title("Common variable")]
|
||||
// [RequiredField] public SharedAiStat aiStat;
|
||||
// [RequiredField] public SharedNavMeshAgent navMeshAgent;
|
||||
// [RequiredField] public SharedTransform targetTransform;
|
||||
//
|
||||
// [Title("Offense Variable")]
|
||||
// public SharedIslandInfo islandInfo;
|
||||
//
|
||||
// [Title("Defense Variable")]
|
||||
// public SharedVector3 defensePos;
|
||||
//
|
||||
// private AiController aiController;
|
||||
// private bool isFindTargetCoroutine;
|
||||
//
|
||||
// private static readonly WaitForSeconds FindTargetWaitTime = new(0.5f);
|
||||
//
|
||||
// public override void OnAwake()
|
||||
// {
|
||||
// aiController = GetComponent<AiController>();
|
||||
// }
|
||||
//
|
||||
// public override void OnStart()
|
||||
// {
|
||||
// switch (aiStat.Value.AttackerType)
|
||||
// {
|
||||
// case EAttackerType.NONE:
|
||||
// Debug.Log("AiStat.AttackerType == NONE Error");
|
||||
// break;
|
||||
// case EAttackerType.OFFENSE:
|
||||
// isFindTargetCoroutine = true;
|
||||
// StartCoroutine(nameof(FindTargetInOffense));
|
||||
// break;
|
||||
// case EAttackerType.DEFENSE:
|
||||
// isFindTargetCoroutine = true;
|
||||
// StartCoroutine(nameof(FindTargetInDefense));
|
||||
// break;
|
||||
// default:
|
||||
// throw new ArgumentOutOfRangeException();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public override TaskStatus OnUpdate()
|
||||
// {
|
||||
// return isFindTargetCoroutine ? TaskStatus.Running : TaskStatus.Success;
|
||||
// }
|
||||
//
|
||||
// public IEnumerator FindTargetInOffense()
|
||||
// {
|
||||
// switch (aiStat.Value.OffenseType)
|
||||
// {
|
||||
// case EOffenseType.NONE:
|
||||
// Debug.Log("AiStat.OffenseType == NONE Error");
|
||||
// break;
|
||||
// case EOffenseType.NORMAL:
|
||||
// if (islandInfo.Value.EnemyList.Count > 0)
|
||||
// {
|
||||
// aiController.SetNearestTargetInOffense(islandInfo.Value.EnemyList);
|
||||
// }
|
||||
// else if (islandInfo.Value.HouseList.Count > 0)
|
||||
// {
|
||||
// aiController.SetNearestTargetInOffense(islandInfo.Value.HouseList);
|
||||
// }
|
||||
// break;
|
||||
// case EOffenseType.ONLY_HOUSE:
|
||||
// if (navMeshAgent.Value.pathStatus == NavMeshPathStatus.PathPartial)
|
||||
// {
|
||||
// aiController.SetNearestTargetInOffense(islandInfo.Value.TargetAllList);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (islandInfo.Value.HouseList.Count > 0)
|
||||
// {
|
||||
// aiController.SetNearestTargetInOffense(islandInfo.Value.HouseList);
|
||||
// }
|
||||
// else if (islandInfo.Value.EnemyList.Count > 0)
|
||||
// {
|
||||
// aiController.SetNearestTargetInOffense(islandInfo.Value.EnemyList);
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// default:
|
||||
// throw new ArgumentOutOfRangeException();
|
||||
// }
|
||||
//
|
||||
// if (targetTransform.Value && navMeshAgent.Value.enabled)
|
||||
// {
|
||||
// var distanceToTarget = Vector3.Distance(transform.position, targetTransform.Value.position);
|
||||
//
|
||||
// navMeshAgent.Value.isStopped = distanceToTarget <= navMeshAgent.Value.stoppingDistance;
|
||||
// if (distanceToTarget > navMeshAgent.Value.stoppingDistance)
|
||||
// {
|
||||
// navMeshAgent.Value.SetDestination(targetTransform.Value.position);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// yield return FindTargetWaitTime;
|
||||
// isFindTargetCoroutine = false;
|
||||
// }
|
||||
//
|
||||
// public IEnumerator FindTargetInDefense()
|
||||
// {
|
||||
// switch (aiStat.Value.DefenseType)
|
||||
// {
|
||||
// case EDefenseType.NONE:
|
||||
// Debug.Log("AiStat.DefenseType == NONE Error");
|
||||
// break;
|
||||
// case EDefenseType.STRIKER:
|
||||
// aiController.SetNearestTargetInDefense(transform.position, aiStat.Value.ViewRange);
|
||||
// break;
|
||||
// case EDefenseType.MIDFIELDER:
|
||||
// aiController.SetNearestTargetInDefense(transform.position, aiStat.Value.ViewRange);
|
||||
// break;
|
||||
// case EDefenseType.DEFENDER:
|
||||
// aiController.SetNearestTargetInDefense(defensePos.Value, aiStat.Value.DefenseRange);
|
||||
// break;
|
||||
// case EDefenseType.KEEPER:
|
||||
// aiController.SetNearestTargetInDefense(transform.position, aiStat.Value.ViewRange);
|
||||
// break;
|
||||
// default:
|
||||
// throw new ArgumentOutOfRangeException();
|
||||
// }
|
||||
//
|
||||
// if (targetTransform.Value && navMeshAgent.Value.enabled)
|
||||
// {
|
||||
// var distanceToTarget = Vector3.Distance(transform.position, targetTransform.Value.position);
|
||||
//
|
||||
// navMeshAgent.Value.isStopped = distanceToTarget <= navMeshAgent.Value.stoppingDistance;
|
||||
// if (distanceToTarget > navMeshAgent.Value.stoppingDistance)
|
||||
// {
|
||||
// navMeshAgent.Value.SetDestination(targetTransform.Value.position);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// yield return FindTargetWaitTime;
|
||||
// isFindTargetCoroutine = false;
|
||||
// }
|
||||
//
|
||||
// public override void OnEnd()
|
||||
// {
|
||||
// StopAllCoroutines();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
@ -1,43 +1,43 @@
|
||||
using BehaviorDesigner.Runtime;
|
||||
using BehaviorDesigner.Runtime.Tasks;
|
||||
using Sirenix.OdinInspector;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
[TaskCategory("Custom/Action")]
|
||||
public class InitVariable : Action
|
||||
{
|
||||
[Title("Common variable")]
|
||||
[RequiredField] public SharedAiStat aiStat;
|
||||
[RequiredField] public SharedNavMeshAgent agent;
|
||||
|
||||
[Title("Offense variable")]
|
||||
public SharedIslandInfo islandInfo;
|
||||
public SharedBool isCommanded;
|
||||
|
||||
[Title("Defense variable")]
|
||||
public SharedVector3 defensePos;
|
||||
|
||||
private AiController aiController;
|
||||
|
||||
public override void OnStart()
|
||||
{
|
||||
aiController = GetComponent<AiController>();
|
||||
|
||||
aiStat.Value = aiController.AiStat;
|
||||
agent.Value = aiController.GetNavMeshAgent();
|
||||
|
||||
if (aiStat.Value.AttackerType == EAttackerType.OFFENSE)
|
||||
{
|
||||
islandInfo.Value = aiController.GetIslandInfo();
|
||||
isCommanded.Value = aiController.IsCommanded;
|
||||
}
|
||||
}
|
||||
|
||||
public override TaskStatus OnUpdate()
|
||||
{
|
||||
return TaskStatus.Success;
|
||||
}
|
||||
}
|
||||
}
|
||||
// using BehaviorDesigner.Runtime;
|
||||
// using BehaviorDesigner.Runtime.Tasks;
|
||||
// using Sirenix.OdinInspector;
|
||||
//
|
||||
// // ReSharper disable once CheckNamespace
|
||||
// namespace BlueWaterProject
|
||||
// {
|
||||
// [TaskCategory("Custom/Action")]
|
||||
// public class InitVariable : Action
|
||||
// {
|
||||
// [Title("Common variable")]
|
||||
// [RequiredField] public SharedAiStat aiStat;
|
||||
// [RequiredField] public SharedNavMeshAgent agent;
|
||||
//
|
||||
// [Title("Offense variable")]
|
||||
// public SharedIslandInfo islandInfo;
|
||||
// public SharedBool isCommanded;
|
||||
//
|
||||
// [Title("Defense variable")]
|
||||
// public SharedVector3 defensePos;
|
||||
//
|
||||
// private AiController aiController;
|
||||
//
|
||||
// public override void OnStart()
|
||||
// {
|
||||
// aiController = GetComponent<AiController>();
|
||||
//
|
||||
// aiStat.Value = aiController.AiStat;
|
||||
// agent.Value = aiController.GetNavMeshAgent();
|
||||
//
|
||||
// if (aiStat.Value.AttackerType == EAttackerType.OFFENSE)
|
||||
// {
|
||||
// islandInfo.Value = aiController.GetIslandInfo();
|
||||
// isCommanded.Value = aiController.IsCommanded;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public override TaskStatus OnUpdate()
|
||||
// {
|
||||
// return TaskStatus.Success;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
@ -1,11 +1,11 @@
|
||||
using BlueWaterProject;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BehaviorDesigner.Runtime
|
||||
{
|
||||
[System.Serializable]
|
||||
public class SharedAiStat : SharedVariable<AiStat>
|
||||
{
|
||||
public static implicit operator SharedAiStat(AiStat value) { return new SharedAiStat { mValue = value }; }
|
||||
}
|
||||
}
|
||||
// using BlueWaterProject;
|
||||
//
|
||||
// // ReSharper disable once CheckNamespace
|
||||
// namespace BehaviorDesigner.Runtime
|
||||
// {
|
||||
// [System.Serializable]
|
||||
// public class SharedAiStat : SharedVariable<AiStat>
|
||||
// {
|
||||
// public static implicit operator SharedAiStat(AiStat value) { return new SharedAiStat { mValue = value }; }
|
||||
// }
|
||||
// }
|
@ -5,6 +5,68 @@ namespace BlueWaterProject
|
||||
{
|
||||
public class EnemyAi : HumanAi
|
||||
{
|
||||
#region Properties and variables
|
||||
|
||||
protected EnemyStat enemyStat;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unit Built-in methods
|
||||
|
||||
private void Start()
|
||||
{
|
||||
InitStart();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Custom methods
|
||||
|
||||
protected override void SetLayer()
|
||||
{
|
||||
gameObject.layer = LayerMask.NameToLayer("Enemy");
|
||||
var hitBoxObj = hitBoxCollider.gameObject;
|
||||
hitBoxObj.layer = LayerMask.NameToLayer("HitBox");
|
||||
hitBoxObj.tag = "Enemy";
|
||||
targetLayer = LayerMask.GetMask("Player") | LayerMask.GetMask("Pirate");
|
||||
|
||||
if (enemyStat.AttackerType == EAttackerType.OFFENSE)
|
||||
{
|
||||
targetLayer |= LayerMask.GetMask("Props");
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void InitStart()
|
||||
{
|
||||
var enemyViewData = GetEnemyViewData();
|
||||
|
||||
InitViewModel(enemyViewData);
|
||||
SetCurrentHp(enemyStat.MaxHp);
|
||||
SetMoveSpeed(enemyStat.MoveSpd);
|
||||
|
||||
if (enemyStat.AttackerType == EAttackerType.DEFENSE)
|
||||
{
|
||||
defensePos = transform.position;
|
||||
}
|
||||
}
|
||||
|
||||
private void InitViewModel(EnemyView enemyView)
|
||||
{
|
||||
SetActiveViewModel(backpackContainer, enemyView.Backpack);
|
||||
SetActiveViewModel(leftWeaponContainer, enemyView.LeftWeapon);
|
||||
SetActiveViewModel(leftShieldContainer, enemyView.LeftShield);
|
||||
SetActiveViewModel(headContainer, enemyView.Head);
|
||||
SetActiveViewModel(rightWeaponContainer, enemyView.RightWeapon);
|
||||
SetActiveViewModel(bodyContainer, enemyView.Body);
|
||||
SetActiveViewModel(flagContainer, enemyView.Flag);
|
||||
}
|
||||
|
||||
protected override void SetCurrentHp(float value) => enemyStat.CurrentHp = value;
|
||||
|
||||
private EnemyView GetEnemyViewData() => Application.isPlaying ?
|
||||
DataManager.Inst.GetEnemyViewDictionaryFromKey(enemyStat.ViewIdx) :
|
||||
DataManager.Inst.GetEnemyViewSoFromKey(enemyStat.ViewIdx);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -5,7 +5,7 @@ using UnityEngine;
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
[Serializable]
|
||||
public class AiView : IIdx
|
||||
public class EnemyView : IIdx
|
||||
{
|
||||
#region Property and variable
|
||||
|
||||
@ -40,7 +40,7 @@ namespace BlueWaterProject
|
||||
/// <summary>
|
||||
/// 기본 생성자
|
||||
/// </summary>
|
||||
public AiView()
|
||||
public EnemyView()
|
||||
{
|
||||
Idx = null;
|
||||
Backpack = -1;
|
||||
@ -55,7 +55,7 @@ namespace BlueWaterProject
|
||||
/// <summary>
|
||||
/// 일반 생성자
|
||||
/// </summary>
|
||||
public AiView(string idx, int backpack, int leftWeapon, int leftShield, int head, int rightWeapon, int body, int flag)
|
||||
public EnemyView(string idx, int backpack, int leftWeapon, int leftShield, int head, int rightWeapon, int body, int flag)
|
||||
{
|
||||
Idx = idx;
|
||||
Backpack = backpack;
|
||||
@ -70,16 +70,16 @@ namespace BlueWaterProject
|
||||
/// <summary>
|
||||
/// 복사 생성자
|
||||
/// </summary>
|
||||
public AiView(AiView aiView)
|
||||
public EnemyView(EnemyView enemyView)
|
||||
{
|
||||
Idx = aiView.Idx;
|
||||
Backpack = aiView.Backpack;
|
||||
LeftWeapon = aiView.LeftWeapon;
|
||||
LeftShield = aiView.LeftShield;
|
||||
Head = aiView.Head;
|
||||
RightWeapon = aiView.RightWeapon;
|
||||
Body = aiView.Body;
|
||||
Flag = aiView.Flag;
|
||||
Idx = enemyView.Idx;
|
||||
Backpack = enemyView.Backpack;
|
||||
LeftWeapon = enemyView.LeftWeapon;
|
||||
LeftShield = enemyView.LeftShield;
|
||||
Head = enemyView.Head;
|
||||
RightWeapon = enemyView.RightWeapon;
|
||||
Body = enemyView.Body;
|
||||
Flag = enemyView.Flag;
|
||||
}
|
||||
|
||||
#endregion
|
@ -1,3 +1,4 @@
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
@ -5,6 +6,26 @@ namespace BlueWaterProject
|
||||
{
|
||||
public class EnemySpearKnight : EnemyAi
|
||||
{
|
||||
private CloseWeapon closeWeapon;
|
||||
|
||||
protected override void InitStart()
|
||||
{
|
||||
base.InitStart();
|
||||
|
||||
SetCloseWeapon();
|
||||
}
|
||||
|
||||
private void SetCloseWeapon()
|
||||
{
|
||||
var rightWeaponView = DataManager.Inst.GetEnemyViewDictionaryFromKey(enemyStat.ViewIdx).RightWeapon;
|
||||
if (rightWeaponView == -1) return;
|
||||
|
||||
closeWeapon = rightWeaponContainer.GetChild(rightWeaponView).AddComponent<CloseWeapon>();
|
||||
var closeWeaponObj = closeWeapon.gameObject;
|
||||
closeWeaponObj.layer = LayerMask.NameToLayer("Weapon");
|
||||
closeWeaponObj.tag = "Enemy";
|
||||
closeWeapon.SetAttackerAiType(EAiType.ENEMY);
|
||||
closeWeapon.SetBoxCollider();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
@ -5,6 +6,26 @@ namespace BlueWaterProject
|
||||
{
|
||||
public class EnemySpearman : EnemyAi
|
||||
{
|
||||
private CloseWeapon closeWeapon;
|
||||
|
||||
protected override void InitStart()
|
||||
{
|
||||
base.InitStart();
|
||||
|
||||
SetCloseWeapon();
|
||||
}
|
||||
|
||||
private void SetCloseWeapon()
|
||||
{
|
||||
var rightWeaponView = DataManager.Inst.GetEnemyViewDictionaryFromKey(enemyStat.ViewIdx).RightWeapon;
|
||||
if (rightWeaponView == -1) return;
|
||||
|
||||
closeWeapon = rightWeaponContainer.GetChild(rightWeaponView).AddComponent<CloseWeapon>();
|
||||
var closeWeaponObj = closeWeapon.gameObject;
|
||||
closeWeaponObj.layer = LayerMask.NameToLayer("Weapon");
|
||||
closeWeaponObj.tag = "Enemy";
|
||||
closeWeapon.SetAttackerAiType(EAiType.ENEMY);
|
||||
closeWeapon.SetBoxCollider();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
@ -5,6 +6,26 @@ namespace BlueWaterProject
|
||||
{
|
||||
public class EnemySwordKnight : EnemyAi
|
||||
{
|
||||
private CloseWeapon closeWeapon;
|
||||
|
||||
protected override void InitStart()
|
||||
{
|
||||
base.InitStart();
|
||||
|
||||
SetCloseWeapon();
|
||||
}
|
||||
|
||||
private void SetCloseWeapon()
|
||||
{
|
||||
var rightWeaponView = DataManager.Inst.GetEnemyViewDictionaryFromKey(enemyStat.ViewIdx).RightWeapon;
|
||||
if (rightWeaponView == -1) return;
|
||||
|
||||
closeWeapon = rightWeaponContainer.GetChild(rightWeaponView).AddComponent<CloseWeapon>();
|
||||
var closeWeaponObj = closeWeapon.gameObject;
|
||||
closeWeaponObj.layer = LayerMask.NameToLayer("Weapon");
|
||||
closeWeaponObj.tag = "Enemy";
|
||||
closeWeapon.SetAttackerAiType(EAiType.ENEMY);
|
||||
closeWeapon.SetBoxCollider();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
@ -5,6 +6,26 @@ namespace BlueWaterProject
|
||||
{
|
||||
public class EnemySwordman : EnemyAi
|
||||
{
|
||||
private CloseWeapon closeWeapon;
|
||||
|
||||
protected override void InitStart()
|
||||
{
|
||||
base.InitStart();
|
||||
|
||||
SetCloseWeapon();
|
||||
}
|
||||
|
||||
private void SetCloseWeapon()
|
||||
{
|
||||
var rightWeaponView = DataManager.Inst.GetEnemyViewDictionaryFromKey(enemyStat.ViewIdx).RightWeapon;
|
||||
if (rightWeaponView == -1) return;
|
||||
|
||||
closeWeapon = rightWeaponContainer.GetChild(rightWeaponView).AddComponent<CloseWeapon>();
|
||||
var closeWeaponObj = closeWeapon.gameObject;
|
||||
closeWeaponObj.layer = LayerMask.NameToLayer("Weapon");
|
||||
closeWeaponObj.tag = "Enemy";
|
||||
closeWeapon.SetAttackerAiType(EAiType.ENEMY);
|
||||
closeWeapon.SetBoxCollider();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AI;
|
||||
using UnityEngine.Animations;
|
||||
@ -6,10 +5,14 @@ using UnityEngine.Animations;
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class HumanAi : BaseAi
|
||||
public abstract class HumanAi : BaseAi
|
||||
{
|
||||
#region Properties and variables
|
||||
|
||||
// 일반 변수
|
||||
protected LayerMask targetLayer;
|
||||
protected Vector3 defensePos;
|
||||
|
||||
// 모델링 관련 변수
|
||||
protected Transform backpackContainer;
|
||||
protected Transform leftWeaponContainer;
|
||||
@ -37,24 +40,28 @@ namespace BlueWaterProject
|
||||
|
||||
#endregion
|
||||
|
||||
#region Abstract methods
|
||||
|
||||
protected abstract void SetLayer();
|
||||
|
||||
protected abstract void SetCurrentHp(float value);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity built-in methods
|
||||
|
||||
protected virtual void Awake()
|
||||
{
|
||||
InitComponent();
|
||||
FlagLookAtFlag();
|
||||
}
|
||||
|
||||
protected void Start()
|
||||
{
|
||||
InitStart();
|
||||
SetLayer();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Custom methods
|
||||
|
||||
protected virtual void InitComponent()
|
||||
private void InitComponent()
|
||||
{
|
||||
backpackContainer = Utils.GetComponentAndAssert<Transform>(transform.
|
||||
Find("Bip001/Bip001 Pelvis/Bip001 Spine/Backpack_container"));
|
||||
@ -77,20 +84,6 @@ namespace BlueWaterProject
|
||||
hitBoxCollider = Utils.GetComponentAndAssert<CapsuleCollider>(transform.Find("HitBox"));
|
||||
lookAtConstraint = Utils.GetComponentAndAssert<LookAtConstraint>(flagContainer);
|
||||
}
|
||||
|
||||
protected virtual void InitStart()
|
||||
{
|
||||
// var getAiViewData = GetAiViewData(false);
|
||||
//
|
||||
// InitViewModel(false);
|
||||
// FindMaterial();
|
||||
// SetLayer();
|
||||
// SetCloseWeapon(getAiViewData);
|
||||
// SetCurrentHp(AiStat.MaxHp);
|
||||
// SetMoveSpeed(AiStat.MoveSpd);
|
||||
//
|
||||
// DefensePos = transform.position;
|
||||
}
|
||||
|
||||
private void FlagLookAtFlag()
|
||||
{
|
||||
@ -106,6 +99,23 @@ namespace BlueWaterProject
|
||||
|
||||
lookAtConstraint.constraintActive = true;
|
||||
}
|
||||
|
||||
protected void SetActiveViewModel(Transform container, int model)
|
||||
{
|
||||
foreach (Transform item in container)
|
||||
{
|
||||
if (!item.gameObject.activeSelf) continue;
|
||||
|
||||
item.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
if (model != -1)
|
||||
{
|
||||
container.GetChild(model).gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
protected void SetMoveSpeed(float value) => humanAgent.speed = value;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
@ -1,3 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
@ -5,6 +8,105 @@ namespace BlueWaterProject
|
||||
{
|
||||
public class PirateAi : HumanAi
|
||||
{
|
||||
#region Properties and variables
|
||||
|
||||
[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.red;
|
||||
|
||||
[DisableIf("@true")]
|
||||
[SerializeField] private IslandInfo islandInfo;
|
||||
|
||||
protected PirateStat pirateStat;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unit Built-in methods
|
||||
|
||||
private void Start()
|
||||
{
|
||||
InitStart();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Custom methods
|
||||
|
||||
protected override void SetLayer()
|
||||
{
|
||||
gameObject.layer = LayerMask.NameToLayer("Pirate");
|
||||
var hitBoxObj = hitBoxCollider.gameObject;
|
||||
hitBoxObj.layer = LayerMask.NameToLayer("HitBox");
|
||||
hitBoxObj.tag = "Pirate";
|
||||
targetLayer = LayerMask.GetMask("Enemy");
|
||||
|
||||
if (pirateStat.AttackerType == EAttackerType.OFFENSE)
|
||||
{
|
||||
targetLayer |= LayerMask.GetMask("Props");
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void InitStart()
|
||||
{
|
||||
var pirateViewData = GetPirateViewData();
|
||||
|
||||
InitViewModel(pirateViewData);
|
||||
FindMaterial();
|
||||
SetCurrentHp(pirateStat.MaxHp);
|
||||
SetMoveSpeed(pirateStat.MoveSpd);
|
||||
|
||||
if (pirateStat.AttackerType == EAttackerType.DEFENSE)
|
||||
{
|
||||
defensePos = transform.position;
|
||||
}
|
||||
}
|
||||
|
||||
private void InitViewModel(PirateView pirateView)
|
||||
{
|
||||
SetActiveViewModel(backpackContainer, pirateView.Backpack);
|
||||
SetActiveViewModel(leftWeaponContainer, pirateView.LeftWeapon);
|
||||
SetActiveViewModel(leftShieldContainer, pirateView.LeftShield);
|
||||
SetActiveViewModel(headContainer, pirateView.Head);
|
||||
SetActiveViewModel(rightWeaponContainer, pirateView.RightWeapon);
|
||||
SetActiveViewModel(bodyContainer, pirateView.Body);
|
||||
SetActiveViewModel(flagContainer, pirateView.Flag);
|
||||
}
|
||||
|
||||
private void FindMaterial()
|
||||
{
|
||||
var skinnedMeshRenderers = GetComponentsInChildren<SkinnedMeshRenderer>();
|
||||
var meshRenderers = GetComponentsInChildren<MeshRenderer>();
|
||||
|
||||
foreach (var skin in skinnedMeshRenderers)
|
||||
{
|
||||
if (!skin.gameObject.activeSelf) continue;
|
||||
|
||||
skinMaterialList.Add(skin.material);
|
||||
}
|
||||
|
||||
foreach (var skin in meshRenderers)
|
||||
{
|
||||
if (!skin.gameObject.activeSelf) continue;
|
||||
|
||||
skinMaterialList.Add(skin.material);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SetCurrentHp(float value) => pirateStat.CurrentHp = value;
|
||||
|
||||
private PirateView GetPirateViewData() => Application.isPlaying ?
|
||||
DataManager.Inst.GetPirateViewDictionaryFromKey(pirateStat.ViewIdx) :
|
||||
DataManager.Inst.GetPirateViewSoFromKey(pirateStat.ViewIdx);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
87
BlueWater/Assets/02.Scripts/Ai/Human/Pirate/PirateView.cs
Normal file
87
BlueWater/Assets/02.Scripts/Ai/Human/Pirate/PirateView.cs
Normal file
@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
[Serializable]
|
||||
public class PirateView : IIdx
|
||||
{
|
||||
#region Property and variable
|
||||
|
||||
[field: Tooltip("고유 인덱스")]
|
||||
[field: SerializeField] public string Idx { get; set; }
|
||||
|
||||
[field: Tooltip("등에 메고 다닐 모델\n화살통 등")]
|
||||
[field: SerializeField] public int Backpack { get; set; }
|
||||
|
||||
[field: Tooltip("왼손 무기 모델\n활, 스태프 등")]
|
||||
[field: SerializeField] public int LeftWeapon { get; set; }
|
||||
|
||||
[field: Tooltip("왼손 방패 모델")]
|
||||
[field: SerializeField] public int LeftShield { get; set; }
|
||||
|
||||
[field: Tooltip("머리 전체 모델")]
|
||||
[field: SerializeField] public int Head { get; set; }
|
||||
|
||||
[field: Tooltip("오른손 무기 모델\n왼손 무기를 제외한 무기 등")]
|
||||
[field: SerializeField] public int RightWeapon { get; set; }
|
||||
|
||||
[field: Tooltip("몸통 및 팔, 다리 전체 모델")]
|
||||
[field: SerializeField] public int Body { get; set; }
|
||||
|
||||
[field: Tooltip("부대 깃발 모델")]
|
||||
[field: SerializeField] public int Flag { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// 기본 생성자
|
||||
/// </summary>
|
||||
public PirateView()
|
||||
{
|
||||
Idx = null;
|
||||
Backpack = -1;
|
||||
LeftWeapon = -1;
|
||||
LeftShield = -1;
|
||||
Head = -1;
|
||||
RightWeapon = -1;
|
||||
Body = -1;
|
||||
Flag = -1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 일반 생성자
|
||||
/// </summary>
|
||||
public PirateView(string idx, int backpack, int leftWeapon, int leftShield, int head, int rightWeapon, int body, int flag)
|
||||
{
|
||||
Idx = idx;
|
||||
Backpack = backpack;
|
||||
LeftWeapon = leftWeapon;
|
||||
LeftShield = leftShield;
|
||||
Head = head;
|
||||
RightWeapon = rightWeapon;
|
||||
Body = body;
|
||||
Flag = flag;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 복사 생성자
|
||||
/// </summary>
|
||||
public PirateView(PirateView pirateView)
|
||||
{
|
||||
Idx = pirateView.Idx;
|
||||
Backpack = pirateView.Backpack;
|
||||
LeftWeapon = pirateView.LeftWeapon;
|
||||
LeftShield = pirateView.LeftShield;
|
||||
Head = pirateView.Head;
|
||||
RightWeapon = pirateView.RightWeapon;
|
||||
Body = pirateView.Body;
|
||||
Flag = pirateView.Flag;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9b65a318a1f8f084696c3b965c723a3c
|
||||
guid: c3bd308daf7dc1546aa18e7f1dc27ec5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
@ -3,7 +3,7 @@ using UnityEngine;
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class PirateArcher : EnemyAi
|
||||
public class PirateArcher : PirateAi
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -1,10 +1,31 @@
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class PirateAxeman : EnemyAi
|
||||
public class PirateAxeman : PirateAi
|
||||
{
|
||||
private CloseWeapon closeWeapon;
|
||||
|
||||
protected override void InitStart()
|
||||
{
|
||||
base.InitStart();
|
||||
|
||||
SetCloseWeapon();
|
||||
}
|
||||
|
||||
private void SetCloseWeapon()
|
||||
{
|
||||
var rightWeaponView = DataManager.Inst.GetPirateViewDictionaryFromKey(pirateStat.ViewIdx).RightWeapon;
|
||||
if (rightWeaponView == -1) return;
|
||||
|
||||
closeWeapon = rightWeaponContainer.GetChild(rightWeaponView).AddComponent<CloseWeapon>();
|
||||
var closeWeaponObj = closeWeapon.gameObject;
|
||||
closeWeaponObj.layer = LayerMask.NameToLayer("Weapon");
|
||||
closeWeaponObj.tag = "Pirate";
|
||||
closeWeapon.SetAttackerAiType(EAiType.PIRATE);
|
||||
closeWeapon.SetBoxCollider();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,31 @@
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class PirateSpearman : EnemyAi
|
||||
public class PirateSpearman : PirateAi
|
||||
{
|
||||
private CloseWeapon closeWeapon;
|
||||
|
||||
protected override void InitStart()
|
||||
{
|
||||
base.InitStart();
|
||||
|
||||
SetCloseWeapon();
|
||||
}
|
||||
|
||||
private void SetCloseWeapon()
|
||||
{
|
||||
var rightWeaponView = DataManager.Inst.GetPirateViewDictionaryFromKey(pirateStat.ViewIdx).RightWeapon;
|
||||
if (rightWeaponView == -1) return;
|
||||
|
||||
closeWeapon = rightWeaponContainer.GetChild(rightWeaponView).AddComponent<CloseWeapon>();
|
||||
var closeWeaponObj = closeWeapon.gameObject;
|
||||
closeWeaponObj.layer = LayerMask.NameToLayer("Weapon");
|
||||
closeWeaponObj.tag = "Pirate";
|
||||
closeWeapon.SetAttackerAiType(EAiType.PIRATE);
|
||||
closeWeapon.SetBoxCollider();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,31 @@
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class PirateSwordKnight : EnemyAi
|
||||
public class PirateSwordKnight : PirateAi
|
||||
{
|
||||
private CloseWeapon closeWeapon;
|
||||
|
||||
protected override void InitStart()
|
||||
{
|
||||
base.InitStart();
|
||||
|
||||
SetCloseWeapon();
|
||||
}
|
||||
|
||||
private void SetCloseWeapon()
|
||||
{
|
||||
var rightWeaponView = DataManager.Inst.GetPirateViewDictionaryFromKey(pirateStat.ViewIdx).RightWeapon;
|
||||
if (rightWeaponView == -1) return;
|
||||
|
||||
closeWeapon = rightWeaponContainer.GetChild(rightWeaponView).AddComponent<CloseWeapon>();
|
||||
var closeWeaponObj = closeWeapon.gameObject;
|
||||
closeWeaponObj.layer = LayerMask.NameToLayer("Weapon");
|
||||
closeWeaponObj.tag = "Pirate";
|
||||
closeWeapon.SetAttackerAiType(EAiType.PIRATE);
|
||||
closeWeapon.SetBoxCollider();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,31 @@
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class PirateSwordman : EnemyAi
|
||||
public class PirateSwordman : PirateAi
|
||||
{
|
||||
private CloseWeapon closeWeapon;
|
||||
|
||||
protected override void InitStart()
|
||||
{
|
||||
base.InitStart();
|
||||
|
||||
SetCloseWeapon();
|
||||
}
|
||||
|
||||
private void SetCloseWeapon()
|
||||
{
|
||||
var rightWeaponView = DataManager.Inst.GetPirateViewDictionaryFromKey(pirateStat.ViewIdx).RightWeapon;
|
||||
if (rightWeaponView == -1) return;
|
||||
|
||||
closeWeapon = rightWeaponContainer.GetChild(rightWeaponView).AddComponent<CloseWeapon>();
|
||||
var closeWeaponObj = closeWeapon.gameObject;
|
||||
closeWeaponObj.layer = LayerMask.NameToLayer("Weapon");
|
||||
closeWeaponObj.tag = "Pirate";
|
||||
closeWeapon.SetAttackerAiType(EAiType.PIRATE);
|
||||
closeWeapon.SetBoxCollider();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
12
BlueWater/Assets/02.Scripts/Ai/Human/Unit/BaseUnit.cs
Normal file
12
BlueWater/Assets/02.Scripts/Ai/Human/Unit/BaseUnit.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public abstract class BaseUnit : MonoBehaviour
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c5afbc440d3a67a41abc9383d97fa23e
|
||||
guid: 0e842ba4025e2a54094d6deee431e313
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
86
BlueWater/Assets/02.Scripts/Ai/Human/Unit/EnemyUnit.cs
Normal file
86
BlueWater/Assets/02.Scripts/Ai/Human/Unit/EnemyUnit.cs
Normal file
@ -0,0 +1,86 @@
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class EnemyUnit : BaseUnit
|
||||
{
|
||||
#region Property and variable
|
||||
|
||||
[PropertyOrder(-10)]
|
||||
public EnemyUnitStat enemyUnitStat;
|
||||
|
||||
private bool isClickedTypeAllButton;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity built-in function
|
||||
|
||||
private void OnDrawGizmosSelected()
|
||||
{
|
||||
if (!Application.isPlaying || enemyUnitStat == null || enemyUnitStat.SailorCount <= 0) return;
|
||||
|
||||
foreach (var item in enemyUnitStat.UnitList)
|
||||
{
|
||||
var unitPos = item.transform.position;
|
||||
var ray = new Ray(unitPos + Vector3.up, Vector3.down);
|
||||
Gizmos.color = Physics.Raycast(ray, UnitManager.Inst.MaxGroundDistance, UnitManager.Inst.GroundLayer) ? Color.blue : Color.red;
|
||||
Gizmos.DrawRay(ray.origin, ray.direction * UnitManager.Inst.MaxGroundDistance);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Custom function
|
||||
|
||||
[PropertyOrder(-9)]
|
||||
[HorizontalGroup("Split", 0.5f)]
|
||||
[GUIColor("GetCreateUnitButtonColor")]
|
||||
[EnableIf("@DataManager.Inst.GetEnemyUnitStatSoFromKey(enemyUnitStat.Idx) != null")]
|
||||
[Button("유닛 생성")]
|
||||
public void CreateUnit()
|
||||
{
|
||||
UnitManager.Inst.CreateEnemyUnitInEditor(this);
|
||||
}
|
||||
|
||||
[PropertyOrder(-8)]
|
||||
[HorizontalGroup("Split", 0.5f)]
|
||||
[EnableIf("CanAssignUnit")]
|
||||
[Button("유닛 배치")]
|
||||
public void AssignUnit()
|
||||
{
|
||||
if (UnitManager.Inst.CanAssignUnit(this, transform.position))
|
||||
{
|
||||
UnitManager.Inst.AssignEnemyUnit(this, transform.position);
|
||||
}
|
||||
}
|
||||
|
||||
private bool CanAssignUnit()
|
||||
{
|
||||
return UnitManager.Inst.CanAssignUnit(this, transform.position);
|
||||
}
|
||||
|
||||
[PropertyOrder(-7)]
|
||||
[GUIColor(1, 0, 0)]
|
||||
[Button("유닛 초기화")]
|
||||
private void ResetUnit()
|
||||
{
|
||||
var tempUnitIdx = enemyUnitStat.Idx;
|
||||
UnitManager.Inst.DestroyDeployedUnits(this);
|
||||
|
||||
enemyUnitStat = new EnemyUnitStat()
|
||||
{
|
||||
Idx = tempUnitIdx
|
||||
};
|
||||
isClickedTypeAllButton = false;
|
||||
}
|
||||
|
||||
private Color GetCreateUnitButtonColor() => enemyUnitStat.UnitList.Count > 0 ? Color.white : Color.green;
|
||||
private Color GetTypeAllButtonColor() => isClickedTypeAllButton ? Color.white : Color.green;
|
||||
private void OnTypeChanged() => isClickedTypeAllButton = false;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -7,7 +7,7 @@ using UnityEngine;
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
[Serializable]
|
||||
public class Unit : IIdx
|
||||
public class EnemyUnitStat : IIdx
|
||||
{
|
||||
#region Property and variable
|
||||
|
||||
@ -22,17 +22,12 @@ namespace BlueWaterProject
|
||||
|
||||
[field: Tooltip("부대의 이름 또는 선장의 이름")]
|
||||
[field: SerializeField] public string UnitName { get; set; }
|
||||
|
||||
[field: Tooltip("부대의 종류")]
|
||||
[field: DisableIf("@true")]
|
||||
[field: SerializeField] public GlobalValue.UnitType UnitType { get; set; }
|
||||
|
||||
[field: Tooltip("선원의 수")]
|
||||
[field: Range(0, GlobalValue.ONE_UNIT_CAPACITY - 1)]
|
||||
[field: SerializeField] public int SailorCount { get; set; }
|
||||
|
||||
[field: EnumToggleButtons]
|
||||
[field: DisableIf("@UnitType.ToString().Contains(\"_P\")")]
|
||||
[field: SerializeField] public EAttackerType AttackerType { get; set; }
|
||||
|
||||
[field: EnumToggleButtons]
|
||||
@ -48,13 +43,12 @@ namespace BlueWaterProject
|
||||
|
||||
#region Constructor
|
||||
|
||||
public Unit()
|
||||
public EnemyUnitStat()
|
||||
{
|
||||
Idx = null;
|
||||
CaptainStatIdx = null;
|
||||
SailorStatIdx = null;
|
||||
UnitName = null;
|
||||
UnitType = GlobalValue.UnitType.NONE;
|
||||
SailorCount = 0;
|
||||
AttackerType = EAttackerType.NONE;
|
||||
OffenseType = EOffenseType.NONE;
|
||||
@ -62,7 +56,7 @@ namespace BlueWaterProject
|
||||
UnitList = new List<AiController>(GlobalValue.ONE_UNIT_CAPACITY);
|
||||
}
|
||||
|
||||
public Unit(string idx, string captainIdx, string sailorIdx, string unitName,
|
||||
public EnemyUnitStat(string idx, string captainIdx, string sailorIdx, string unitName,
|
||||
int sailorCount, EAttackerType attackerType, EOffenseType offenseType, EDefenseType defenseType, List<AiController> unitList)
|
||||
{
|
||||
Idx = idx;
|
||||
@ -73,29 +67,23 @@ namespace BlueWaterProject
|
||||
OffenseType = offenseType;
|
||||
DefenseType = defenseType;
|
||||
UnitList = unitList;
|
||||
|
||||
UnitType = Application.isPlaying ? DataManager.Inst.GetAiStatDictionaryKey(CaptainStatIdx).UnitType :
|
||||
DataManager.Inst.GetAiStatSoKey(CaptainStatIdx).UnitType;
|
||||
|
||||
if (AttackerType == EAttackerType.NONE) return;
|
||||
|
||||
AttackerType = attackerType;
|
||||
}
|
||||
|
||||
public Unit(Unit unit)
|
||||
public EnemyUnitStat(EnemyUnitStat enemyUnitStat)
|
||||
{
|
||||
Idx = unit.Idx;
|
||||
CaptainStatIdx = unit.CaptainStatIdx;
|
||||
SailorStatIdx = unit.SailorStatIdx;
|
||||
UnitName = unit.UnitName;
|
||||
SailorCount = unit.SailorCount;
|
||||
AttackerType = unit.AttackerType;
|
||||
OffenseType = unit.OffenseType;
|
||||
DefenseType = unit.DefenseType;
|
||||
UnitList = unit.UnitList;
|
||||
|
||||
UnitType = Application.isPlaying ? DataManager.Inst.GetAiStatDictionaryKey(CaptainStatIdx).UnitType :
|
||||
DataManager.Inst.GetAiStatSoKey(CaptainStatIdx).UnitType;
|
||||
Idx = enemyUnitStat.Idx;
|
||||
CaptainStatIdx = enemyUnitStat.CaptainStatIdx;
|
||||
SailorStatIdx = enemyUnitStat.SailorStatIdx;
|
||||
UnitName = enemyUnitStat.UnitName;
|
||||
SailorCount = enemyUnitStat.SailorCount;
|
||||
AttackerType = enemyUnitStat.AttackerType;
|
||||
OffenseType = enemyUnitStat.OffenseType;
|
||||
DefenseType = enemyUnitStat.DefenseType;
|
||||
UnitList = enemyUnitStat.UnitList;
|
||||
}
|
||||
|
||||
#endregion
|
60
BlueWater/Assets/02.Scripts/Ai/Human/Unit/PirateUnit.cs
Normal file
60
BlueWater/Assets/02.Scripts/Ai/Human/Unit/PirateUnit.cs
Normal file
@ -0,0 +1,60 @@
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class PirateUnit : BaseUnit
|
||||
{
|
||||
#region Property and variable
|
||||
|
||||
[PropertyOrder(-10)]
|
||||
public PirateUnitStat pirateUnitStat;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Custom function
|
||||
|
||||
public void MoveCommand(Vector3 targetPos)
|
||||
{
|
||||
var gridSize = 0;
|
||||
|
||||
switch (pirateUnitStat.SailorCount)
|
||||
{
|
||||
case 0:
|
||||
gridSize = 1;
|
||||
break;
|
||||
case <= 3:
|
||||
gridSize = 2;
|
||||
break;
|
||||
case <= 8:
|
||||
gridSize = 3;
|
||||
break;
|
||||
case <= 15:
|
||||
gridSize = 4;
|
||||
break;
|
||||
default:
|
||||
print("유닛의 병사 숫자 설정 에러");
|
||||
break;
|
||||
}
|
||||
|
||||
for (var i = 0; i < gridSize; i++)
|
||||
{
|
||||
for (var j = 0; j < gridSize; j++)
|
||||
{
|
||||
var currentPos = i * gridSize + j;
|
||||
|
||||
if (currentPos > pirateUnitStat.SailorCount) break;
|
||||
|
||||
var zOffset = (i - (gridSize - 1) / 2.0f) * UnitManager.Inst.UnitSpacing;
|
||||
var xOffset = (j - (gridSize - 1) / 2.0f) * UnitManager.Inst.UnitSpacing;
|
||||
var movePos = targetPos + new Vector3(xOffset, 0, zOffset);
|
||||
|
||||
pirateUnitStat.UnitList[currentPos].CommandMove(movePos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bc4b39997a8c45c4895df94d0b0ad944
|
||||
guid: ab5bc80b7b2c7ae4a8629d3000d7c0e0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
91
BlueWater/Assets/02.Scripts/Ai/Human/Unit/PirateUnitStat.cs
Normal file
91
BlueWater/Assets/02.Scripts/Ai/Human/Unit/PirateUnitStat.cs
Normal file
@ -0,0 +1,91 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
[Serializable]
|
||||
public class PirateUnitStat : IIdx
|
||||
{
|
||||
#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("부대의 이름 또는 선장의 이름")]
|
||||
[field: SerializeField] public string UnitName { get; set; }
|
||||
|
||||
[field: Tooltip("선원의 수")]
|
||||
[field: Range(0, GlobalValue.ONE_UNIT_CAPACITY - 1)]
|
||||
[field: SerializeField] public int SailorCount { get; set; }
|
||||
|
||||
[field: EnumToggleButtons]
|
||||
[field: SerializeField] public EAttackerType AttackerType { get; set; }
|
||||
|
||||
[field: EnumToggleButtons]
|
||||
[field: SerializeField] public EOffenseType OffenseType { get; set; }
|
||||
|
||||
[field: EnumToggleButtons]
|
||||
[field: SerializeField] public EDefenseType DefenseType { get; set; }
|
||||
|
||||
[field: Tooltip("부대 병력 리스트")]
|
||||
[field: SerializeField] public List<AiController> UnitList { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
public PirateUnitStat()
|
||||
{
|
||||
Idx = null;
|
||||
CaptainStatIdx = null;
|
||||
SailorStatIdx = null;
|
||||
UnitName = null;
|
||||
SailorCount = 0;
|
||||
AttackerType = EAttackerType.NONE;
|
||||
OffenseType = EOffenseType.NONE;
|
||||
DefenseType = EDefenseType.NONE;
|
||||
UnitList = new List<AiController>(GlobalValue.ONE_UNIT_CAPACITY);
|
||||
}
|
||||
|
||||
public PirateUnitStat(string idx, string captainIdx, string sailorIdx, string unitName,
|
||||
int sailorCount, EAttackerType attackerType, EOffenseType offenseType, EDefenseType defenseType, List<AiController> unitList)
|
||||
{
|
||||
Idx = idx;
|
||||
CaptainStatIdx = captainIdx;
|
||||
SailorStatIdx = sailorIdx;
|
||||
UnitName = unitName;
|
||||
SailorCount = sailorCount;
|
||||
OffenseType = offenseType;
|
||||
DefenseType = defenseType;
|
||||
UnitList = unitList;
|
||||
|
||||
if (AttackerType == EAttackerType.NONE) return;
|
||||
|
||||
AttackerType = attackerType;
|
||||
}
|
||||
|
||||
public PirateUnitStat(PirateUnitStat pirateUnitStat)
|
||||
{
|
||||
Idx = pirateUnitStat.Idx;
|
||||
CaptainStatIdx = pirateUnitStat.CaptainStatIdx;
|
||||
SailorStatIdx = pirateUnitStat.SailorStatIdx;
|
||||
UnitName = pirateUnitStat.UnitName;
|
||||
SailorCount = pirateUnitStat.SailorCount;
|
||||
AttackerType = pirateUnitStat.AttackerType;
|
||||
OffenseType = pirateUnitStat.OffenseType;
|
||||
DefenseType = pirateUnitStat.DefenseType;
|
||||
UnitList = pirateUnitStat.UnitList;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9768d3f2214ba044f8af4513230ebab2
|
||||
guid: 010709867b2516347b35489d9e198df0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
@ -1,131 +0,0 @@
|
||||
using System;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class UnitController : MonoBehaviour
|
||||
{
|
||||
#region Property and variable
|
||||
|
||||
[PropertyOrder(-10)]
|
||||
public Unit unit;
|
||||
|
||||
private bool isClickedTypeAllButton;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity built-in function
|
||||
|
||||
private void OnDrawGizmosSelected()
|
||||
{
|
||||
if (!Application.isPlaying || unit == null || unit.SailorCount <= 0) return;
|
||||
|
||||
foreach (var item in unit.UnitList)
|
||||
{
|
||||
var unitPos = item.transform.position;
|
||||
var ray = new Ray(unitPos + Vector3.up, Vector3.down);
|
||||
Gizmos.color = Physics.Raycast(ray, UnitManager.Inst.MaxGroundDistance, UnitManager.Inst.GroundLayer) ? Color.blue : Color.red;
|
||||
Gizmos.DrawRay(ray.origin, ray.direction * UnitManager.Inst.MaxGroundDistance);
|
||||
}
|
||||
}
|
||||
|
||||
// private void Start()
|
||||
// {
|
||||
// SetIslandInfoTest();
|
||||
// }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Custom function
|
||||
|
||||
[PropertyOrder(-9)]
|
||||
[HorizontalGroup("Split", 0.5f)]
|
||||
[GUIColor("GetCreateUnitButtonColor")]
|
||||
[EnableIf("@DataManager.Inst.GetEnemyUnitSoKey(unit.Idx) != null || DataManager.Inst.GetUnitSoKey(unit.Idx) != null")]
|
||||
[Button("유닛 생성")]
|
||||
public void CreateUnit()
|
||||
{
|
||||
UnitManager.Inst.CreateUnitInEditor(this);
|
||||
}
|
||||
|
||||
[PropertyOrder(-8)]
|
||||
[HorizontalGroup("Split", 0.5f)]
|
||||
[EnableIf("CanAssignUnit")]
|
||||
[Button("유닛 배치")]
|
||||
private void SetAssignUnitInEditor()
|
||||
{
|
||||
if (UnitManager.Inst.CanAssignUnit(this, transform.position))
|
||||
{
|
||||
UnitManager.Inst.AssignUnit(this, transform.position, false);
|
||||
}
|
||||
}
|
||||
|
||||
private bool CanAssignUnit()
|
||||
{
|
||||
return UnitManager.Inst.CanAssignUnit(this, transform.position);
|
||||
}
|
||||
|
||||
[PropertyOrder(-7)]
|
||||
[GUIColor(1, 0, 0)]
|
||||
[Button("유닛 초기화")]
|
||||
private void ResetUnit()
|
||||
{
|
||||
var tempUnitIdx = unit.Idx;
|
||||
UnitManager.Inst.DestroyDeployedUnits(this);
|
||||
|
||||
unit = new Unit
|
||||
{
|
||||
Idx = tempUnitIdx
|
||||
};
|
||||
isClickedTypeAllButton = false;
|
||||
}
|
||||
|
||||
public void MoveCommand(Vector3 targetPos)
|
||||
{
|
||||
var gridSize = 0;
|
||||
|
||||
switch (unit.SailorCount)
|
||||
{
|
||||
case 0:
|
||||
gridSize = 1;
|
||||
break;
|
||||
case <= 3:
|
||||
gridSize = 2;
|
||||
break;
|
||||
case <= 8:
|
||||
gridSize = 3;
|
||||
break;
|
||||
case <= 15:
|
||||
gridSize = 4;
|
||||
break;
|
||||
default:
|
||||
print("유닛의 병사 숫자 설정 에러");
|
||||
break;
|
||||
}
|
||||
|
||||
for (var i = 0; i < gridSize; i++)
|
||||
{
|
||||
for (var j = 0; j < gridSize; j++)
|
||||
{
|
||||
var currentPos = i * gridSize + j;
|
||||
|
||||
if (currentPos > unit.SailorCount) break;
|
||||
|
||||
var zOffset = (i - (gridSize - 1) / 2.0f) * UnitManager.Inst.UnitSpacing;
|
||||
var xOffset = (j - (gridSize - 1) / 2.0f) * UnitManager.Inst.UnitSpacing;
|
||||
var movePos = targetPos + new Vector3(xOffset, 0, zOffset);
|
||||
|
||||
unit.UnitList[currentPos].CommandMove(movePos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Color GetCreateUnitButtonColor() => unit.UnitList.Count > 0 ? Color.white : Color.green;
|
||||
private Color GetTypeAllButtonColor() => isClickedTypeAllButton ? Color.white : Color.green;
|
||||
private void OnTypeChanged() => isClickedTypeAllButton = false;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -55,18 +55,18 @@ namespace BlueWaterProject
|
||||
|
||||
[field: Tooltip("병력들의 애니메이터 컨트롤러 리스트")]
|
||||
[field: SerializeField] public List<AnimatorController> AIAnimatorControllerList { get; private set; } = new(GlobalValue.AI_ANIMATOR_CAPACITY);
|
||||
|
||||
|
||||
[Tooltip("플레이어가 가지고 있는 부대리스트")]
|
||||
[SerializeField] private List<UnitController> playerUnitList = new(PLAYER_UNIT_CAPACITY);
|
||||
[SerializeField] private List<PirateUnit> pirateUnitList = new(PIRATE_UNIT_CAPACITY);
|
||||
|
||||
public IReadOnlyList<UnitController> PlayerUnitList => playerUnitList;
|
||||
public IReadOnlyList<PirateUnit> PirateUnitList => pirateUnitList;
|
||||
|
||||
private Transform playerUnits;
|
||||
private Transform pirateUnits;
|
||||
|
||||
private const int MATRICES_CAPACITY = 9;
|
||||
private const int CHARACTER_PREFAB_CAPACITY = 10;
|
||||
private const int ANIMATOR_CONTROLLER_PREFAB_CAPACITY = 6;
|
||||
private const int PLAYER_UNIT_CAPACITY = 50;
|
||||
private const int PIRATE_UNIT_CAPACITY = 50;
|
||||
|
||||
#endregion
|
||||
|
||||
@ -163,34 +163,34 @@ namespace BlueWaterProject
|
||||
{
|
||||
SetPlayerUnits();
|
||||
|
||||
playerUnitList = new List<UnitController>(PLAYER_UNIT_CAPACITY);
|
||||
pirateUnitList = new List<PirateUnit>(PIRATE_UNIT_CAPACITY);
|
||||
|
||||
foreach (Transform item in playerUnits)
|
||||
foreach (Transform item in pirateUnits)
|
||||
{
|
||||
if (!item.gameObject.activeSelf) continue;
|
||||
|
||||
playerUnitList.Add(item.GetComponent<UnitController>());
|
||||
pirateUnitList.Add(item.GetComponent<PirateUnit>());
|
||||
}
|
||||
}
|
||||
|
||||
private void SetPlayerUnits()
|
||||
{
|
||||
var playerUnitsObj = GameObject.Find("PlayerUnits");
|
||||
if (playerUnitsObj)
|
||||
var pirateUnitsObj = GameObject.Find("PirateUnits");
|
||||
if (pirateUnitsObj)
|
||||
{
|
||||
playerUnits = playerUnitsObj.transform;
|
||||
pirateUnits = pirateUnitsObj.transform;
|
||||
}
|
||||
else
|
||||
{
|
||||
playerUnitsObj = new GameObject("PlayerUnits");
|
||||
playerUnitsObj.transform.SetPositionAndRotation(Vector3.zero, Quaternion.identity);
|
||||
playerUnits = playerUnitsObj.transform;
|
||||
pirateUnitsObj = new GameObject("PirateUnits");
|
||||
pirateUnitsObj.transform.SetPositionAndRotation(Vector3.zero, Quaternion.identity);
|
||||
pirateUnits = pirateUnitsObj.transform;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetUnitName(UnitController unitController, string baseName)
|
||||
private void SetUnitName(BaseUnit baseUnit, string unitName, string baseName)
|
||||
{
|
||||
if (string.IsNullOrEmpty(unitController.unit.UnitName))
|
||||
if (string.IsNullOrEmpty(unitName))
|
||||
{
|
||||
const int maxIterations = 100;
|
||||
var namingNum = 0;
|
||||
@ -199,50 +199,51 @@ namespace BlueWaterProject
|
||||
{
|
||||
var newUnitName = $"{baseName}_Unit_{namingNum + 1:00}";
|
||||
var checkGameObject = GameObject.Find(newUnitName);
|
||||
if (checkGameObject && checkGameObject != unitController.gameObject)
|
||||
if (checkGameObject && checkGameObject != baseUnit.gameObject)
|
||||
{
|
||||
namingNum++;
|
||||
}
|
||||
else
|
||||
{
|
||||
unitController.gameObject.name = newUnitName;
|
||||
baseUnit.gameObject.name = newUnitName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
unitController.gameObject.name = unitController.unit.UnitName;
|
||||
baseUnit.gameObject.name = unitName;
|
||||
}
|
||||
}
|
||||
|
||||
public void CreateAndAssign(string cardIdx, Vector3 assignPos)
|
||||
public void PirateUnitCreateAndAssign(string cardIdx, Vector3 assignPos)
|
||||
{
|
||||
var newUnitController = CreateUnit(cardIdx, EAttackerType.OFFENSE);
|
||||
AssignUnit(newUnitController, assignPos, true);
|
||||
var newUnitController = CreatePirateUnit(cardIdx, EAttackerType.OFFENSE);
|
||||
AssignPirateUnit(newUnitController, assignPos, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 동적 생성용 부대 생성 함수
|
||||
/// </summary>
|
||||
public UnitController CreateUnit(string cardIdx, EAttackerType attackerType)
|
||||
public PirateUnit CreatePirateUnit(string cardIdx, EAttackerType attackerType)
|
||||
{
|
||||
var card = DataManager.Inst.GetCardDictionaryFromKey(cardIdx);
|
||||
var unit = DataManager.Inst.GetUnitDictionaryKey(card.UnitIdx);
|
||||
var captainStat = DataManager.Inst.GetAiStatDictionaryKey(unit.CaptainStatIdx);
|
||||
var sailorStat = DataManager.Inst.GetAiStatDictionaryKey(unit.SailorStatIdx);
|
||||
var unit = DataManager.Inst.GetPirateUnitStatDictionaryFromKey(card.UnitIdx);
|
||||
var captainStat = DataManager.Inst.GetEnemyStatDictionaryFromKey(unit.CaptainStatIdx);
|
||||
var sailorStat = DataManager.Inst.GetEnemyStatDictionaryFromKey(unit.SailorStatIdx);
|
||||
|
||||
SetPlayerUnits();
|
||||
|
||||
var newUnitController = Instantiate(UnitPrefab, Vector3.zero, Quaternion.identity, playerUnits).GetComponent<UnitController>();
|
||||
newUnitController.unit = new Unit(unit);
|
||||
var newUnitController = Instantiate(UnitPrefab, Vector3.zero, Quaternion.identity, pirateUnits).GetComponent<PirateUnit>();
|
||||
newUnitController.pirateUnitStat = new PirateUnitStat(unit);
|
||||
|
||||
DestroyDeployedUnits(newUnitController);
|
||||
|
||||
var baseName = newUnitController.unit.UnitType.ToString();
|
||||
SetUnitName(newUnitController, baseName);
|
||||
var pirateStat = DataManager.Inst.GetPirateStatDictionaryFromKey(newUnitController.pirateUnitStat.SailorStatIdx);
|
||||
var baseName = pirateStat.UnitType.ToString();
|
||||
SetUnitName(newUnitController, newUnitController.pirateUnitStat.UnitName, baseName);
|
||||
|
||||
newUnitController.unit.UnitList = new List<AiController>(newUnitController.unit.SailorCount + 1);
|
||||
newUnitController.pirateUnitStat.UnitList = new List<AiController>(newUnitController.pirateUnitStat.SailorCount + 1);
|
||||
|
||||
var unitControllerTransform = newUnitController.transform;
|
||||
var unitControllerRotation = unitControllerTransform.rotation;
|
||||
@ -250,7 +251,7 @@ namespace BlueWaterProject
|
||||
|
||||
var gridSize = 0;
|
||||
|
||||
switch (newUnitController.unit.SailorCount)
|
||||
switch (newUnitController.pirateUnitStat.SailorCount)
|
||||
{
|
||||
case 0:
|
||||
gridSize = 1;
|
||||
@ -277,7 +278,7 @@ namespace BlueWaterProject
|
||||
{
|
||||
var currentPos = i * gridSize + j;
|
||||
|
||||
if (currentPos > newUnitController.unit.SailorCount) break;
|
||||
if (currentPos > newUnitController.pirateUnitStat.SailorCount) break;
|
||||
|
||||
var zOffset = (i - (gridSize - 1) / 2.0f) * UnitSpacing;
|
||||
var xOffset = (j - (gridSize - 1) / 2.0f) * UnitSpacing;
|
||||
@ -291,12 +292,12 @@ namespace BlueWaterProject
|
||||
baseObj.name = newSoldierName;
|
||||
baseObj.gameObject.SetActive(false);
|
||||
|
||||
var aiController = GetAiController(baseObj, newUnitController.unit.UnitType, currentPos == heroPosition ? captainStat : sailorStat);
|
||||
var aiController = GetAiController(baseObj, pirateStat.UnitType, currentPos == heroPosition ? captainStat : sailorStat);
|
||||
|
||||
aiController.SetAttackerType(attackerType);
|
||||
aiController.SetOffenseType(newUnitController.unit.OffenseType);
|
||||
aiController.SetDefenseType(newUnitController.unit.DefenseType);
|
||||
newUnitController.unit.UnitList.Add(aiController);
|
||||
aiController.SetOffenseType(newUnitController.pirateUnitStat.OffenseType);
|
||||
aiController.SetDefenseType(newUnitController.pirateUnitStat.DefenseType);
|
||||
newUnitController.pirateUnitStat.UnitList.Add(aiController);
|
||||
}
|
||||
}
|
||||
newUnitController.transform.rotation *= unitControllerRotation;
|
||||
@ -307,31 +308,32 @@ namespace BlueWaterProject
|
||||
/// <summary>
|
||||
/// 에디터용 부대 생성 함수
|
||||
/// </summary>
|
||||
public void CreateUnitInEditor(UnitController unitController)
|
||||
public void CreateEnemyUnitInEditor(EnemyUnit enemyUnit)
|
||||
{
|
||||
var unit = DataManager.Inst.GetUnitSoKey(unitController.unit.Idx) ?? DataManager.Inst.GetEnemyUnitSoKey(unitController.unit.Idx);
|
||||
var unit = DataManager.Inst.GetEnemyUnitStatSoFromKey(enemyUnit.enemyUnitStat.Idx);
|
||||
|
||||
SetPlayerUnits();
|
||||
|
||||
unitController.unit = new Unit(unit);
|
||||
enemyUnit.enemyUnitStat = new EnemyUnitStat(unit);
|
||||
|
||||
var captainStat = DataManager.Inst.GetAiStatSoKey(unitController.unit.CaptainStatIdx);
|
||||
var sailorStat = DataManager.Inst.GetAiStatSoKey(unitController.unit.SailorStatIdx);
|
||||
var captainStat = DataManager.Inst.GetEnemyStatSoFromKey(enemyUnit.enemyUnitStat.CaptainStatIdx);
|
||||
var sailorStat = DataManager.Inst.GetEnemyStatSoFromKey(enemyUnit.enemyUnitStat.SailorStatIdx);
|
||||
|
||||
DestroyDeployedUnits(unitController);
|
||||
DestroyDeployedUnits(enemyUnit);
|
||||
|
||||
var baseName = unitController.unit.UnitType.ToString();
|
||||
SetUnitName(unitController, baseName);
|
||||
var enemyStat = DataManager.Inst.GetEnemyStatDictionaryFromKey(enemyUnit.enemyUnitStat.SailorStatIdx);
|
||||
var baseName = enemyStat.UnitType.ToString();
|
||||
SetUnitName(enemyUnit, enemyUnit.enemyUnitStat.UnitName, baseName);
|
||||
|
||||
unitController.unit.UnitList = new List<AiController>(unitController.unit.SailorCount + 1);
|
||||
enemyUnit.enemyUnitStat.UnitList = new List<AiController>(enemyUnit.enemyUnitStat.SailorCount + 1);
|
||||
|
||||
var unitControllerTransform = unitController.transform;
|
||||
var unitControllerTransform = enemyUnit.transform;
|
||||
var unitControllerRotation = unitControllerTransform.rotation;
|
||||
unitControllerTransform.rotation = Quaternion.identity;
|
||||
|
||||
var gridSize = 0;
|
||||
|
||||
switch (unitController.unit.SailorCount)
|
||||
switch (enemyUnit.enemyUnitStat.SailorCount)
|
||||
{
|
||||
case 0:
|
||||
gridSize = 1;
|
||||
@ -358,33 +360,33 @@ namespace BlueWaterProject
|
||||
{
|
||||
var currentPos = i * gridSize + j;
|
||||
|
||||
if (currentPos > unitController.unit.SailorCount) break;
|
||||
if (currentPos > enemyUnit.enemyUnitStat.SailorCount) break;
|
||||
|
||||
var zOffset = (i - (gridSize - 1) / 2.0f) * UnitSpacing;
|
||||
var xOffset = (j - (gridSize - 1) / 2.0f) * UnitSpacing;
|
||||
var spawnPosition = unitControllerTransform.position + new Vector3(xOffset, 0, zOffset);
|
||||
|
||||
var baseObj = Instantiate(BaseCharacterPrefab, spawnPosition,
|
||||
Quaternion.identity, unitController.transform);
|
||||
Quaternion.identity, enemyUnit.transform);
|
||||
|
||||
var newSoldierName = $"{baseName}_{currentPos + 1:00}";
|
||||
|
||||
baseObj.name = newSoldierName;
|
||||
baseObj.gameObject.SetActive(false);
|
||||
|
||||
var aiController = GetAiController(baseObj, unitController.unit.UnitType, currentPos == heroPosition ? captainStat : sailorStat);
|
||||
var aiController = GetAiController(baseObj, enemyStat.UnitType, currentPos == heroPosition ? captainStat : sailorStat);
|
||||
|
||||
aiController.SetAttackerType(unitController.unit.AttackerType);
|
||||
aiController.SetOffenseType(unitController.unit.OffenseType);
|
||||
aiController.SetDefenseType(unitController.unit.DefenseType);
|
||||
aiController.SetAttackerType(enemyUnit.enemyUnitStat.AttackerType);
|
||||
aiController.SetOffenseType(enemyUnit.enemyUnitStat.OffenseType);
|
||||
aiController.SetDefenseType(enemyUnit.enemyUnitStat.DefenseType);
|
||||
aiController.InitStartInEditor();
|
||||
unitController.unit.UnitList.Add(aiController);
|
||||
enemyUnit.enemyUnitStat.UnitList.Add(aiController);
|
||||
}
|
||||
}
|
||||
unitController.transform.rotation *= unitControllerRotation;
|
||||
enemyUnit.transform.rotation *= unitControllerRotation;
|
||||
}
|
||||
|
||||
private AiController GetAiController(GameObject baseObj, GlobalValue.UnitType unitType, AiStat aiStat)
|
||||
private AiController GetAiController(GameObject baseObj, GlobalValue.UnitType unitType, EnemyStat aiStat)
|
||||
{
|
||||
AiController temp = null;
|
||||
switch (unitType)
|
||||
@ -427,22 +429,22 @@ namespace BlueWaterProject
|
||||
|
||||
if (temp == null) return null;
|
||||
|
||||
temp.AiStat = new AiStat(aiStat);
|
||||
//temp.AiStat = new AiStat(aiStat);
|
||||
return temp;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 유닛 배치 함수
|
||||
/// </summary>
|
||||
public bool CanAssignUnit(UnitController unitController, Vector3 assignPos)
|
||||
public bool CanAssignUnit(EnemyUnit enemyUnit, Vector3 assignPos)
|
||||
{
|
||||
if (unitController.unit.UnitList.Count <= 0) return false;
|
||||
if (enemyUnit.enemyUnitStat.UnitList.Count <= 0) return false;
|
||||
|
||||
unitController.transform.position = assignPos;
|
||||
enemyUnit.transform.position = assignPos;
|
||||
|
||||
for (var i = 0; i < unitController.unit.SailorCount; i++)
|
||||
for (var i = 0; i < enemyUnit.enemyUnitStat.SailorCount; i++)
|
||||
{
|
||||
var unitPos = unitController.unit.UnitList[i].transform.position;
|
||||
var unitPos = enemyUnit.enemyUnitStat.UnitList[i].transform.position;
|
||||
var ray = new Ray(unitPos + Vector3.up, Vector3.down);
|
||||
if (Physics.Raycast(ray, out var hit, MaxGroundDistance, GroundLayer))
|
||||
{
|
||||
@ -457,12 +459,32 @@ namespace BlueWaterProject
|
||||
return true;
|
||||
}
|
||||
|
||||
public void AssignUnit(UnitController unitController, Vector3 assignPos, bool isOffense)
|
||||
public void AssignEnemyUnit(EnemyUnit enemyUnit, Vector3 assignPos)
|
||||
{
|
||||
unitController.transform.position = assignPos;
|
||||
enemyUnit.transform.position = assignPos;
|
||||
|
||||
foreach (var unit in enemyUnit.enemyUnitStat.UnitList)
|
||||
{
|
||||
var myPos = unit.transform.position;
|
||||
var ray = new Ray(myPos + Vector3.up, Vector3.down);
|
||||
if (Physics.Raycast(ray, out var hit, MaxGroundDistance, GroundLayer))
|
||||
{
|
||||
unit.transform.position = new Vector3(myPos.x, hit.point.y, myPos.z);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var unit in enemyUnit.enemyUnitStat.UnitList)
|
||||
{
|
||||
unit.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void AssignPirateUnit(PirateUnit pirateUnit, Vector3 assignPos, bool isOffense)
|
||||
{
|
||||
pirateUnit.transform.position = assignPos;
|
||||
IslandInfo hitIslandInfo = null;
|
||||
|
||||
foreach (var unit in unitController.unit.UnitList)
|
||||
foreach (var unit in pirateUnit.pirateUnitStat.UnitList)
|
||||
{
|
||||
var myPos = unit.transform.position;
|
||||
var ray = new Ray(myPos + Vector3.up, Vector3.down);
|
||||
@ -477,7 +499,7 @@ namespace BlueWaterProject
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var unit in unitController.unit.UnitList)
|
||||
foreach (var unit in pirateUnit.pirateUnitStat.UnitList)
|
||||
{
|
||||
if (isOffense)
|
||||
{
|
||||
@ -490,31 +512,31 @@ namespace BlueWaterProject
|
||||
/// <summary>
|
||||
/// 기존에 생성된 부대 병력들이 있으면 확인해서 삭제해주는 함수
|
||||
/// </summary>
|
||||
public void DestroyDeployedUnits(UnitController unitController)
|
||||
public void DestroyDeployedUnits(BaseUnit baseUnit)
|
||||
{
|
||||
if (unitController.transform.childCount <= 0) return;
|
||||
if (baseUnit.transform.childCount <= 0) return;
|
||||
|
||||
for (var i = unitController.transform.childCount - 1; i >= 0; i--)
|
||||
for (var i = baseUnit.transform.childCount - 1; i >= 0; i--)
|
||||
{
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
Destroy(unitController.transform.GetChild(i).gameObject);
|
||||
Destroy(baseUnit.transform.GetChild(i).gameObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
DestroyImmediate(unitController.transform.GetChild(i).gameObject);
|
||||
DestroyImmediate(baseUnit.transform.GetChild(i).gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// playerUnitList 내의 속성
|
||||
/// pirateUnitList 내의 속성
|
||||
/// </summary>
|
||||
public void RemovePlayerUnitListElement(UnitController unitController)
|
||||
public void RemovePlayerUnitListElement(PirateUnit pirateUnit)
|
||||
{
|
||||
if (playerUnitList.Contains(unitController))
|
||||
if (pirateUnitList.Contains(pirateUnit))
|
||||
{
|
||||
playerUnitList.Remove(unitController);
|
||||
pirateUnitList.Remove(pirateUnit);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -9,12 +9,12 @@ namespace BlueWaterProject
|
||||
#region Property and variable
|
||||
|
||||
[Tooltip("선택된 부대")]
|
||||
[field: SerializeField] public UnitController SelectedUnitController { get; private set; }
|
||||
[field: SerializeField] public PirateUnit SelectedUnitController { get; private set; }
|
||||
|
||||
[SerializeField] private LayerMask unitLayer;
|
||||
[SerializeField] private LayerMask groundLayer;
|
||||
|
||||
private UnitController previousUnitController;
|
||||
private PirateUnit previousUnitController;
|
||||
private Camera mainCamera;
|
||||
|
||||
#endregion
|
||||
@ -54,13 +54,13 @@ namespace BlueWaterProject
|
||||
// 부대를 클릭 했을 때,
|
||||
if (Physics.Raycast(ray, out var hit, Mathf.Infinity, unitLayer))
|
||||
{
|
||||
var unitController = hit.collider.transform.parent.GetComponent<UnitController>();
|
||||
var unitController = hit.collider.transform.parent.GetComponent<PirateUnit>();
|
||||
if (unitController == null) return;
|
||||
|
||||
// 선택된 부대가 없었을 때,
|
||||
if (SelectedUnitController == null)
|
||||
{
|
||||
foreach (var soldier in unitController.unit.UnitList)
|
||||
foreach (var soldier in unitController.pirateUnitStat.UnitList)
|
||||
{
|
||||
soldier.SelectedHighlight();
|
||||
}
|
||||
@ -71,7 +71,7 @@ namespace BlueWaterProject
|
||||
// 선택된 부대가 이미 선택된 부대일 때,
|
||||
else if (SelectedUnitController == unitController)
|
||||
{
|
||||
foreach (var soldier in SelectedUnitController.unit.UnitList)
|
||||
foreach (var soldier in SelectedUnitController.pirateUnitStat.UnitList)
|
||||
{
|
||||
soldier.ResetHighlight();
|
||||
}
|
||||
@ -82,12 +82,12 @@ namespace BlueWaterProject
|
||||
// 다른 부대가 선택될 때,
|
||||
else
|
||||
{
|
||||
foreach (var soldier in unitController.unit.UnitList)
|
||||
foreach (var soldier in unitController.pirateUnitStat.UnitList)
|
||||
{
|
||||
soldier.SelectedHighlight();
|
||||
}
|
||||
|
||||
foreach (var soldier in SelectedUnitController.unit.UnitList)
|
||||
foreach (var soldier in SelectedUnitController.pirateUnitStat.UnitList)
|
||||
{
|
||||
soldier.ResetHighlight();
|
||||
}
|
||||
@ -102,7 +102,7 @@ namespace BlueWaterProject
|
||||
if (SelectedUnitController == null) return;
|
||||
|
||||
// 선택된 부대가 있었을 때,
|
||||
foreach (var soldier in SelectedUnitController.unit.UnitList)
|
||||
foreach (var soldier in SelectedUnitController.pirateUnitStat.UnitList)
|
||||
{
|
||||
soldier.ResetHighlight();
|
||||
}
|
||||
@ -124,7 +124,7 @@ namespace BlueWaterProject
|
||||
SelectedUnitController.MoveCommand(targetPos);
|
||||
}
|
||||
|
||||
foreach (var soldier in SelectedUnitController.unit.UnitList)
|
||||
foreach (var soldier in SelectedUnitController.pirateUnitStat.UnitList)
|
||||
{
|
||||
soldier.ResetHighlight();
|
||||
}
|
||||
|
@ -38,8 +38,8 @@ namespace BlueWaterProject
|
||||
|
||||
public void CardInit()
|
||||
{
|
||||
var cardInfo = DataManager.Inst.GetUnitDictionaryKey(card.UnitIdx);
|
||||
var captainStat = DataManager.Inst.GetAiStatDictionaryKey(cardInfo.CaptainStatIdx);
|
||||
var cardInfo = DataManager.Inst.GetPirateUnitStatDictionaryFromKey(card.UnitIdx);
|
||||
var captainStat = DataManager.Inst.GetEnemyStatDictionaryFromKey(cardInfo.CaptainStatIdx);
|
||||
typeImage.sprite = DataManager.Inst.cardType[(int)captainStat.UnitType];
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ namespace BlueWaterProject
|
||||
boat.TypeCardSprite.sprite = typeImage.sprite;
|
||||
boat.Target = hit.point;
|
||||
boat.CardIndex = card.Idx;
|
||||
boat.OnLanded += UnitManager.Inst.CreateAndAssign;
|
||||
boat.OnLanded += UnitManager.Inst.PirateUnitCreateAndAssign;
|
||||
|
||||
return true;
|
||||
|
||||
|
@ -1,12 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
[CreateAssetMenu(fileName = "AiViewDataSo", menuName = "ScriptableObjects/AiViewData", order = 0)]
|
||||
public class AiViewDataSo : ScriptableObject
|
||||
{
|
||||
public List<AiView> aiViewDataList = new(GlobalValue.AI_VIEW_DATA_CAPACITY);
|
||||
}
|
||||
}
|
@ -4,7 +4,7 @@ using UnityEngine;
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
[CreateAssetMenu(fileName = "EnemyStatDataSo", menuName = "ScriptableObjects/EnemyStatData", order = 1)]
|
||||
[CreateAssetMenu(fileName = "EnemyStatDataSo", menuName = "ScriptableObjects/EnemyStatData", order = 3)]
|
||||
public class EnemyStatDataSo : ScriptableObject
|
||||
{
|
||||
public List<EnemyStat> enemyStatDataList = new(GlobalValue.ENEMY_STAT_DATA_CAPACITY);
|
||||
|
12
BlueWater/Assets/02.Scripts/Data/EnemyUnitStatDataSo.cs
Normal file
12
BlueWater/Assets/02.Scripts/Data/EnemyUnitStatDataSo.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
[CreateAssetMenu(fileName = "EnemyUnitStatDataSo", menuName = "ScriptableObjects/EnemyUnitStatData", order = 5)]
|
||||
public class EnemyUnitStatDataSo : ScriptableObject
|
||||
{
|
||||
public List<EnemyUnitStat> enemyUnitStatDataList = new(GlobalValue.ENEMY_UNIT_STAT_DATA_CAPACITY);
|
||||
}
|
||||
}
|
12
BlueWater/Assets/02.Scripts/Data/EnemyViewDataSo.cs
Normal file
12
BlueWater/Assets/02.Scripts/Data/EnemyViewDataSo.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
[CreateAssetMenu(fileName = "EnemyViewDataSo", menuName = "ScriptableObjects/EnemyViewData", order = 1)]
|
||||
public class EnemyViewDataSo : ScriptableObject
|
||||
{
|
||||
public List<EnemyView> enemyViewDataList = new(GlobalValue.ENEMY_VIEW_DATA_CAPACITY);
|
||||
}
|
||||
}
|
@ -4,7 +4,7 @@ using UnityEngine;
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
[CreateAssetMenu(fileName = "PirateStatDataSo", menuName = "ScriptableObjects/PirateStatData", order = 1)]
|
||||
[CreateAssetMenu(fileName = "PirateStatDataSo", menuName = "ScriptableObjects/PirateStatData", order = 4)]
|
||||
public class PirateStatDataSo : ScriptableObject
|
||||
{
|
||||
public List<PirateStat> pirateStatDataList = new(GlobalValue.PIRATE_STAT_DATA_CAPACITY);
|
||||
|
12
BlueWater/Assets/02.Scripts/Data/PirateUnitStatDataSo.cs
Normal file
12
BlueWater/Assets/02.Scripts/Data/PirateUnitStatDataSo.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
[CreateAssetMenu(fileName = "PirateUnitStatDataSo", menuName = "ScriptableObjects/PirateUnitStatData", order = 6)]
|
||||
public class PirateUnitStatDataSo : ScriptableObject
|
||||
{
|
||||
public List<PirateUnitStat> pirateUnitStatDataList = new(GlobalValue.PIRATE_UNIT_STAT_DATA_CAPACITY);
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6860dacd36ec53343bc4ee3879adc0e9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
12
BlueWater/Assets/02.Scripts/Data/PirateViewDataSo.cs
Normal file
12
BlueWater/Assets/02.Scripts/Data/PirateViewDataSo.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
[CreateAssetMenu(fileName = "PirateViewDataSo", menuName = "ScriptableObjects/PirateViewData", order = 2)]
|
||||
public class PirateViewDataSo : ScriptableObject
|
||||
{
|
||||
public List<PirateView> pirateViewDataList = new(GlobalValue.PIRATE_VIEW_DATA_CAPACITY);
|
||||
}
|
||||
}
|
11
BlueWater/Assets/02.Scripts/Data/PirateViewDataSo.cs.meta
Normal file
11
BlueWater/Assets/02.Scripts/Data/PirateViewDataSo.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f28df59e93ab2804789a4e010c4f21e1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,455 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0b73a9021577a154c991acd5616ad6d9, type: 3}
|
||||
m_Name: AiStatDataSo
|
||||
m_EditorClassIdentifier:
|
||||
aiStatDataList:
|
||||
- <Idx>k__BackingField: ai_stat_sailor_e_001
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_001
|
||||
<UnitType>k__BackingField: 0
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 30
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 50
|
||||
<Def>k__BackingField: 0
|
||||
<MoveSpd>k__BackingField: 5
|
||||
<AtkCooldown>k__BackingField: 3
|
||||
<ViewRange>k__BackingField: 40
|
||||
<AtkRange>k__BackingField: 40
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 25
|
||||
<AvoidanceRate>k__BackingField: 20
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 1
|
||||
<Inaccuracy>k__BackingField: 4
|
||||
- <Idx>k__BackingField: ai_stat_sailor_e_002
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_002
|
||||
<UnitType>k__BackingField: 1
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 60
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 40
|
||||
<Def>k__BackingField: 10
|
||||
<MoveSpd>k__BackingField: 4.5
|
||||
<AtkCooldown>k__BackingField: 2
|
||||
<ViewRange>k__BackingField: 10
|
||||
<AtkRange>k__BackingField: 3.5
|
||||
<DefenseRange>k__BackingField: 10
|
||||
<ShieldPenetrationRate>k__BackingField: 75
|
||||
<AvoidanceRate>k__BackingField: 10
|
||||
<UsingShield>k__BackingField: 1
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: ai_stat_sailor_e_003
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_003
|
||||
<UnitType>k__BackingField: 2
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 40
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 50
|
||||
<Def>k__BackingField: 5
|
||||
<MoveSpd>k__BackingField: 5.5
|
||||
<AtkCooldown>k__BackingField: 2
|
||||
<ViewRange>k__BackingField: 15
|
||||
<AtkRange>k__BackingField: 3.5
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 75
|
||||
<AvoidanceRate>k__BackingField: 20
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: ai_stat_sailor_e_004
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_004
|
||||
<UnitType>k__BackingField: 3
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 60
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 30
|
||||
<Def>k__BackingField: 10
|
||||
<MoveSpd>k__BackingField: 5
|
||||
<AtkCooldown>k__BackingField: 1.5
|
||||
<ViewRange>k__BackingField: 10
|
||||
<AtkRange>k__BackingField: 3
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 50
|
||||
<AvoidanceRate>k__BackingField: 10
|
||||
<UsingShield>k__BackingField: 1
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: ai_stat_sailor_e_005
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_e_005
|
||||
<UnitType>k__BackingField: 4
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 45
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 35
|
||||
<Def>k__BackingField: 5
|
||||
<MoveSpd>k__BackingField: 6
|
||||
<AtkCooldown>k__BackingField: 1.5
|
||||
<ViewRange>k__BackingField: 15
|
||||
<AtkRange>k__BackingField: 3
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 50
|
||||
<AvoidanceRate>k__BackingField: 30
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: ai_stat_sailor_p_001
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_p_001
|
||||
<UnitType>k__BackingField: 5
|
||||
<AiType>k__BackingField: 1
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 30
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 50
|
||||
<Def>k__BackingField: 0
|
||||
<MoveSpd>k__BackingField: 5
|
||||
<AtkCooldown>k__BackingField: 3
|
||||
<ViewRange>k__BackingField: 40
|
||||
<AtkRange>k__BackingField: 40
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 25
|
||||
<AvoidanceRate>k__BackingField: 20
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 1
|
||||
<Inaccuracy>k__BackingField: 4
|
||||
- <Idx>k__BackingField: ai_stat_sailor_p_002
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_p_002
|
||||
<UnitType>k__BackingField: 6
|
||||
<AiType>k__BackingField: 1
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 50
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 50
|
||||
<Def>k__BackingField: 0
|
||||
<MoveSpd>k__BackingField: 5
|
||||
<AtkCooldown>k__BackingField: 2.5
|
||||
<ViewRange>k__BackingField: 15
|
||||
<AtkRange>k__BackingField: 3.5
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 100
|
||||
<AvoidanceRate>k__BackingField: 10
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: ai_stat_sailor_p_003
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_p_003
|
||||
<UnitType>k__BackingField: 7
|
||||
<AiType>k__BackingField: 1
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 40
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 50
|
||||
<Def>k__BackingField: 5
|
||||
<MoveSpd>k__BackingField: 5.5
|
||||
<AtkCooldown>k__BackingField: 2
|
||||
<ViewRange>k__BackingField: 15
|
||||
<AtkRange>k__BackingField: 3.5
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 75
|
||||
<AvoidanceRate>k__BackingField: 20
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: ai_stat_sailor_p_004
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_p_004
|
||||
<UnitType>k__BackingField: 8
|
||||
<AiType>k__BackingField: 1
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 60
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 30
|
||||
<Def>k__BackingField: 10
|
||||
<MoveSpd>k__BackingField: 5
|
||||
<AtkCooldown>k__BackingField: 1.5
|
||||
<ViewRange>k__BackingField: 10
|
||||
<AtkRange>k__BackingField: 3
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 50
|
||||
<AvoidanceRate>k__BackingField: 10
|
||||
<UsingShield>k__BackingField: 1
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: ai_stat_sailor_p_005
|
||||
<ViewIdx>k__BackingField: ai_view_sailor_p_005
|
||||
<UnitType>k__BackingField: 9
|
||||
<AiType>k__BackingField: 1
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 45
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 35
|
||||
<Def>k__BackingField: 5
|
||||
<MoveSpd>k__BackingField: 6
|
||||
<AtkCooldown>k__BackingField: 1.5
|
||||
<ViewRange>k__BackingField: 15
|
||||
<AtkRange>k__BackingField: 3
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 50
|
||||
<AvoidanceRate>k__BackingField: 30
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: ai_stat_captain_e_001
|
||||
<ViewIdx>k__BackingField: ai_view_captain_e_001
|
||||
<UnitType>k__BackingField: 0
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 150
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 50
|
||||
<Def>k__BackingField: 0
|
||||
<MoveSpd>k__BackingField: 5
|
||||
<AtkCooldown>k__BackingField: 3
|
||||
<ViewRange>k__BackingField: 40
|
||||
<AtkRange>k__BackingField: 40
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 25
|
||||
<AvoidanceRate>k__BackingField: 20
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 1
|
||||
<Inaccuracy>k__BackingField: 4
|
||||
- <Idx>k__BackingField: ai_stat_captain_e_002
|
||||
<ViewIdx>k__BackingField: ai_view_captain_e_002
|
||||
<UnitType>k__BackingField: 1
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 300
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 40
|
||||
<Def>k__BackingField: 10
|
||||
<MoveSpd>k__BackingField: 4.5
|
||||
<AtkCooldown>k__BackingField: 2
|
||||
<ViewRange>k__BackingField: 10
|
||||
<AtkRange>k__BackingField: 3.5
|
||||
<DefenseRange>k__BackingField: 10
|
||||
<ShieldPenetrationRate>k__BackingField: 75
|
||||
<AvoidanceRate>k__BackingField: 10
|
||||
<UsingShield>k__BackingField: 1
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: ai_stat_captain_e_003
|
||||
<ViewIdx>k__BackingField: ai_view_captain_e_003
|
||||
<UnitType>k__BackingField: 2
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 200
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 50
|
||||
<Def>k__BackingField: 5
|
||||
<MoveSpd>k__BackingField: 5.5
|
||||
<AtkCooldown>k__BackingField: 2
|
||||
<ViewRange>k__BackingField: 15
|
||||
<AtkRange>k__BackingField: 3.5
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 75
|
||||
<AvoidanceRate>k__BackingField: 20
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: ai_stat_captain_e_004
|
||||
<ViewIdx>k__BackingField: ai_view_captain_e_004
|
||||
<UnitType>k__BackingField: 3
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 300
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 30
|
||||
<Def>k__BackingField: 10
|
||||
<MoveSpd>k__BackingField: 5
|
||||
<AtkCooldown>k__BackingField: 1.5
|
||||
<ViewRange>k__BackingField: 10
|
||||
<AtkRange>k__BackingField: 3
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 50
|
||||
<AvoidanceRate>k__BackingField: 10
|
||||
<UsingShield>k__BackingField: 1
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: ai_stat_captain_e_005
|
||||
<ViewIdx>k__BackingField: ai_view_captain_e_005
|
||||
<UnitType>k__BackingField: 4
|
||||
<AiType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 225
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 35
|
||||
<Def>k__BackingField: 5
|
||||
<MoveSpd>k__BackingField: 6
|
||||
<AtkCooldown>k__BackingField: 1.5
|
||||
<ViewRange>k__BackingField: 15
|
||||
<AtkRange>k__BackingField: 3
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 50
|
||||
<AvoidanceRate>k__BackingField: 30
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: ai_stat_captain_p_001
|
||||
<ViewIdx>k__BackingField: ai_view_captain_p_001
|
||||
<UnitType>k__BackingField: 5
|
||||
<AiType>k__BackingField: 1
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 150
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 50
|
||||
<Def>k__BackingField: 0
|
||||
<MoveSpd>k__BackingField: 5
|
||||
<AtkCooldown>k__BackingField: 3
|
||||
<ViewRange>k__BackingField: 40
|
||||
<AtkRange>k__BackingField: 40
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 25
|
||||
<AvoidanceRate>k__BackingField: 20
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 1
|
||||
<Inaccuracy>k__BackingField: 4
|
||||
- <Idx>k__BackingField: ai_stat_captain_p_002
|
||||
<ViewIdx>k__BackingField: ai_view_captain_p_002
|
||||
<UnitType>k__BackingField: 6
|
||||
<AiType>k__BackingField: 1
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 250
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 50
|
||||
<Def>k__BackingField: 0
|
||||
<MoveSpd>k__BackingField: 5
|
||||
<AtkCooldown>k__BackingField: 2.5
|
||||
<ViewRange>k__BackingField: 15
|
||||
<AtkRange>k__BackingField: 3.5
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 100
|
||||
<AvoidanceRate>k__BackingField: 10
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: ai_stat_captain_p_003
|
||||
<ViewIdx>k__BackingField: ai_view_captain_p_003
|
||||
<UnitType>k__BackingField: 7
|
||||
<AiType>k__BackingField: 1
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 200
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 50
|
||||
<Def>k__BackingField: 5
|
||||
<MoveSpd>k__BackingField: 5.5
|
||||
<AtkCooldown>k__BackingField: 2
|
||||
<ViewRange>k__BackingField: 15
|
||||
<AtkRange>k__BackingField: 3.5
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 75
|
||||
<AvoidanceRate>k__BackingField: 20
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: ai_stat_captain_p_004
|
||||
<ViewIdx>k__BackingField: ai_view_captain_p_004
|
||||
<UnitType>k__BackingField: 8
|
||||
<AiType>k__BackingField: 1
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 300
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 30
|
||||
<Def>k__BackingField: 10
|
||||
<MoveSpd>k__BackingField: 5
|
||||
<AtkCooldown>k__BackingField: 1.5
|
||||
<ViewRange>k__BackingField: 10
|
||||
<AtkRange>k__BackingField: 3
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 50
|
||||
<AvoidanceRate>k__BackingField: 10
|
||||
<UsingShield>k__BackingField: 1
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: ai_stat_captain_p_005
|
||||
<ViewIdx>k__BackingField: ai_view_captain_p_005
|
||||
<UnitType>k__BackingField: 9
|
||||
<AiType>k__BackingField: 1
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 225
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 35
|
||||
<Def>k__BackingField: 5
|
||||
<MoveSpd>k__BackingField: 6
|
||||
<AtkCooldown>k__BackingField: 1.5
|
||||
<ViewRange>k__BackingField: 15
|
||||
<AtkRange>k__BackingField: 3
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 50
|
||||
<AvoidanceRate>k__BackingField: 30
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
@ -1,175 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c71fe8f0398eaea4e9a1bee5d4a92a64, type: 3}
|
||||
m_Name: AiViewDataSo
|
||||
m_EditorClassIdentifier:
|
||||
aiViewDataList:
|
||||
- <Idx>k__BackingField: ai_view_sailor_e_001
|
||||
<Backpack>k__BackingField: 1
|
||||
<LeftWeapon>k__BackingField: 2
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 16
|
||||
<RightWeapon>k__BackingField: -1
|
||||
<Body>k__BackingField: 11
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: ai_view_sailor_e_002
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: 1
|
||||
<Head>k__BackingField: 46
|
||||
<RightWeapon>k__BackingField: 27
|
||||
<Body>k__BackingField: 18
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: ai_view_sailor_e_003
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 35
|
||||
<RightWeapon>k__BackingField: 27
|
||||
<Body>k__BackingField: 17
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: ai_view_sailor_e_004
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: 9
|
||||
<Head>k__BackingField: 33
|
||||
<RightWeapon>k__BackingField: 6
|
||||
<Body>k__BackingField: 39
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: ai_view_sailor_e_005
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 25
|
||||
<RightWeapon>k__BackingField: 28
|
||||
<Body>k__BackingField: 29
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: ai_view_sailor_p_001
|
||||
<Backpack>k__BackingField: 0
|
||||
<LeftWeapon>k__BackingField: 1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 11
|
||||
<RightWeapon>k__BackingField: -1
|
||||
<Body>k__BackingField: 1
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: ai_view_sailor_p_002
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 50
|
||||
<RightWeapon>k__BackingField: 31
|
||||
<Body>k__BackingField: 58
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: ai_view_sailor_p_003
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 36
|
||||
<RightWeapon>k__BackingField: 27
|
||||
<Body>k__BackingField: 60
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: ai_view_sailor_p_004
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: 2
|
||||
<Head>k__BackingField: 22
|
||||
<RightWeapon>k__BackingField: 24
|
||||
<Body>k__BackingField: 58
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: ai_view_sailor_p_005
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 5
|
||||
<RightWeapon>k__BackingField: 12
|
||||
<Body>k__BackingField: 0
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: ai_view_captain_e_001
|
||||
<Backpack>k__BackingField: 1
|
||||
<LeftWeapon>k__BackingField: 2
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 16
|
||||
<RightWeapon>k__BackingField: -1
|
||||
<Body>k__BackingField: 11
|
||||
<Flag>k__BackingField: 1
|
||||
- <Idx>k__BackingField: ai_view_captain_e_002
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: 1
|
||||
<Head>k__BackingField: 46
|
||||
<RightWeapon>k__BackingField: 27
|
||||
<Body>k__BackingField: 18
|
||||
<Flag>k__BackingField: 1
|
||||
- <Idx>k__BackingField: ai_view_captain_e_003
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 35
|
||||
<RightWeapon>k__BackingField: 27
|
||||
<Body>k__BackingField: 17
|
||||
<Flag>k__BackingField: 1
|
||||
- <Idx>k__BackingField: ai_view_captain_e_004
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: 9
|
||||
<Head>k__BackingField: 33
|
||||
<RightWeapon>k__BackingField: 6
|
||||
<Body>k__BackingField: 39
|
||||
<Flag>k__BackingField: 1
|
||||
- <Idx>k__BackingField: ai_view_captain_e_005
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 25
|
||||
<RightWeapon>k__BackingField: 28
|
||||
<Body>k__BackingField: 29
|
||||
<Flag>k__BackingField: 1
|
||||
- <Idx>k__BackingField: ai_view_captain_p_001
|
||||
<Backpack>k__BackingField: 0
|
||||
<LeftWeapon>k__BackingField: 1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 11
|
||||
<RightWeapon>k__BackingField: -1
|
||||
<Body>k__BackingField: 1
|
||||
<Flag>k__BackingField: 9
|
||||
- <Idx>k__BackingField: ai_view_captain_p_002
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 50
|
||||
<RightWeapon>k__BackingField: 31
|
||||
<Body>k__BackingField: 58
|
||||
<Flag>k__BackingField: 9
|
||||
- <Idx>k__BackingField: ai_view_captain_p_003
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 36
|
||||
<RightWeapon>k__BackingField: 27
|
||||
<Body>k__BackingField: 60
|
||||
<Flag>k__BackingField: 9
|
||||
- <Idx>k__BackingField: ai_view_captain_p_004
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: 2
|
||||
<Head>k__BackingField: 22
|
||||
<RightWeapon>k__BackingField: 24
|
||||
<Body>k__BackingField: 58
|
||||
<Flag>k__BackingField: 9
|
||||
- <Idx>k__BackingField: ai_view_captain_p_005
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 5
|
||||
<RightWeapon>k__BackingField: 12
|
||||
<Body>k__BackingField: 0
|
||||
<Flag>k__BackingField: 9
|
@ -14,16 +14,16 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
cardDataList:
|
||||
- <Idx>k__BackingField: card_001
|
||||
<UnitIdx>k__BackingField: unit_archer_p_001
|
||||
<UnitIdx>k__BackingField: pirate_archer_unit_001
|
||||
- <Idx>k__BackingField: card_002
|
||||
<UnitIdx>k__BackingField: unit_archer_p_002
|
||||
<UnitIdx>k__BackingField: pirate_archer_unit_002
|
||||
- <Idx>k__BackingField: card_003
|
||||
<UnitIdx>k__BackingField: unit_axeman_p_001
|
||||
<UnitIdx>k__BackingField: pirate_axeman_unit_001
|
||||
- <Idx>k__BackingField: card_004
|
||||
<UnitIdx>k__BackingField: unit_spearman_p_001
|
||||
<UnitIdx>k__BackingField: pirate_spearman_unit_001
|
||||
- <Idx>k__BackingField: card_005
|
||||
<UnitIdx>k__BackingField: unit_sword_knight_p_001
|
||||
<UnitIdx>k__BackingField: pirate_spear_knight_unit_001
|
||||
- <Idx>k__BackingField: card_006
|
||||
<UnitIdx>k__BackingField: unit_swordman_p_001
|
||||
<UnitIdx>k__BackingField: pirate_swordman_unit_001
|
||||
- <Idx>k__BackingField: card_007
|
||||
<UnitIdx>k__BackingField: unit_swordman_p_002
|
||||
<UnitIdx>k__BackingField: pirate_swordman_unit_002
|
||||
|
225
BlueWater/Assets/02.Scripts/Data/So/EnemyStatDataSo.asset
Normal file
225
BlueWater/Assets/02.Scripts/Data/So/EnemyStatDataSo.asset
Normal file
@ -0,0 +1,225 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0b73a9021577a154c991acd5616ad6d9, type: 3}
|
||||
m_Name: EnemyStatDataSo
|
||||
m_EditorClassIdentifier:
|
||||
enemyStatDataList:
|
||||
- <Idx>k__BackingField: enemy_stat_sailor_001
|
||||
<ViewIdx>k__BackingField: enemy_view_sailor_001
|
||||
<UnitType>k__BackingField: 0
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 30
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 50
|
||||
<Def>k__BackingField: 0
|
||||
<MoveSpd>k__BackingField: 5
|
||||
<AtkCooldown>k__BackingField: 3
|
||||
<ViewRange>k__BackingField: 40
|
||||
<AtkRange>k__BackingField: 40
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 25
|
||||
<AvoidanceRate>k__BackingField: 20
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 1
|
||||
<Inaccuracy>k__BackingField: 4
|
||||
- <Idx>k__BackingField: enemy_stat_sailor_002
|
||||
<ViewIdx>k__BackingField: enemy_view_sailor_002
|
||||
<UnitType>k__BackingField: 1
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 60
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 40
|
||||
<Def>k__BackingField: 10
|
||||
<MoveSpd>k__BackingField: 4.5
|
||||
<AtkCooldown>k__BackingField: 2
|
||||
<ViewRange>k__BackingField: 10
|
||||
<AtkRange>k__BackingField: 3.5
|
||||
<DefenseRange>k__BackingField: 10
|
||||
<ShieldPenetrationRate>k__BackingField: 75
|
||||
<AvoidanceRate>k__BackingField: 10
|
||||
<UsingShield>k__BackingField: 1
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: enemy_stat_sailor_003
|
||||
<ViewIdx>k__BackingField: enemy_view_sailor_003
|
||||
<UnitType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 40
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 50
|
||||
<Def>k__BackingField: 5
|
||||
<MoveSpd>k__BackingField: 5.5
|
||||
<AtkCooldown>k__BackingField: 2
|
||||
<ViewRange>k__BackingField: 15
|
||||
<AtkRange>k__BackingField: 3.5
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 75
|
||||
<AvoidanceRate>k__BackingField: 20
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: enemy_stat_sailor_004
|
||||
<ViewIdx>k__BackingField: enemy_view_sailor_004
|
||||
<UnitType>k__BackingField: 3
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 60
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 30
|
||||
<Def>k__BackingField: 10
|
||||
<MoveSpd>k__BackingField: 5
|
||||
<AtkCooldown>k__BackingField: 1.5
|
||||
<ViewRange>k__BackingField: 10
|
||||
<AtkRange>k__BackingField: 3
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 50
|
||||
<AvoidanceRate>k__BackingField: 10
|
||||
<UsingShield>k__BackingField: 1
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: enemy_stat_sailor_005
|
||||
<ViewIdx>k__BackingField: enemy_view_sailor_005
|
||||
<UnitType>k__BackingField: 4
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 45
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 35
|
||||
<Def>k__BackingField: 5
|
||||
<MoveSpd>k__BackingField: 6
|
||||
<AtkCooldown>k__BackingField: 1.5
|
||||
<ViewRange>k__BackingField: 15
|
||||
<AtkRange>k__BackingField: 3
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 50
|
||||
<AvoidanceRate>k__BackingField: 30
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: enemy_stat_captain_001
|
||||
<ViewIdx>k__BackingField: enemy_view_captain_001
|
||||
<UnitType>k__BackingField: 0
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 150
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 50
|
||||
<Def>k__BackingField: 0
|
||||
<MoveSpd>k__BackingField: 5
|
||||
<AtkCooldown>k__BackingField: 3
|
||||
<ViewRange>k__BackingField: 40
|
||||
<AtkRange>k__BackingField: 40
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 25
|
||||
<AvoidanceRate>k__BackingField: 20
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 1
|
||||
<Inaccuracy>k__BackingField: 4
|
||||
- <Idx>k__BackingField: enemy_stat_captain_002
|
||||
<ViewIdx>k__BackingField: enemy_view_captain_002
|
||||
<UnitType>k__BackingField: 1
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 300
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 40
|
||||
<Def>k__BackingField: 10
|
||||
<MoveSpd>k__BackingField: 4.5
|
||||
<AtkCooldown>k__BackingField: 2
|
||||
<ViewRange>k__BackingField: 10
|
||||
<AtkRange>k__BackingField: 3.5
|
||||
<DefenseRange>k__BackingField: 10
|
||||
<ShieldPenetrationRate>k__BackingField: 75
|
||||
<AvoidanceRate>k__BackingField: 10
|
||||
<UsingShield>k__BackingField: 1
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: enemy_stat_captain_003
|
||||
<ViewIdx>k__BackingField: enemy_view_captain_003
|
||||
<UnitType>k__BackingField: 2
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 200
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 50
|
||||
<Def>k__BackingField: 5
|
||||
<MoveSpd>k__BackingField: 5.5
|
||||
<AtkCooldown>k__BackingField: 2
|
||||
<ViewRange>k__BackingField: 15
|
||||
<AtkRange>k__BackingField: 3.5
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 75
|
||||
<AvoidanceRate>k__BackingField: 20
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: enemy_stat_captain_004
|
||||
<ViewIdx>k__BackingField: enemy_view_captain_004
|
||||
<UnitType>k__BackingField: 3
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 300
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 30
|
||||
<Def>k__BackingField: 10
|
||||
<MoveSpd>k__BackingField: 5
|
||||
<AtkCooldown>k__BackingField: 1.5
|
||||
<ViewRange>k__BackingField: 10
|
||||
<AtkRange>k__BackingField: 3
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 50
|
||||
<AvoidanceRate>k__BackingField: 10
|
||||
<UsingShield>k__BackingField: 1
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: enemy_stat_captain_005
|
||||
<ViewIdx>k__BackingField: enemy_view_captain_005
|
||||
<UnitType>k__BackingField: 4
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 225
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 35
|
||||
<Def>k__BackingField: 5
|
||||
<MoveSpd>k__BackingField: 6
|
||||
<AtkCooldown>k__BackingField: 1.5
|
||||
<ViewRange>k__BackingField: 15
|
||||
<AtkRange>k__BackingField: 3
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 50
|
||||
<AvoidanceRate>k__BackingField: 30
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 45c7e0b53956de746a37c2e34cb2eb14
|
||||
guid: c19ae12d221eae64f90d58e15a04d592
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
@ -10,34 +10,31 @@ MonoBehaviour:
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3cfd6c9178f4c2a48a79549b238ac772, type: 3}
|
||||
m_Name: EnemyUnitDataSo
|
||||
m_Name: EnemyUnitStatDataSo
|
||||
m_EditorClassIdentifier:
|
||||
unitDataList:
|
||||
- <Idx>k__BackingField: unit_archer_e_001
|
||||
<CaptainStatIdx>k__BackingField: ai_stat_captain_e_001
|
||||
<SailorStatIdx>k__BackingField: ai_stat_sailor_e_001
|
||||
<UnitName>k__BackingField: EnemyArcher001
|
||||
<UnitType>k__BackingField: -1
|
||||
enemyUnitStatDataList:
|
||||
- <Idx>k__BackingField: enemy_archer_unit_001
|
||||
<CaptainStatIdx>k__BackingField: enemy_stat_captain_001
|
||||
<SailorStatIdx>k__BackingField: enemy_stat_sailor_001
|
||||
<UnitName>k__BackingField: EnemyArcherUnit001
|
||||
<SailorCount>k__BackingField: 5
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 3
|
||||
<UnitList>k__BackingField: []
|
||||
- <Idx>k__BackingField: unit_sword_knight_e_001
|
||||
<CaptainStatIdx>k__BackingField: ai_stat_captain_e_004
|
||||
<SailorStatIdx>k__BackingField: ai_stat_sailor_e_004
|
||||
<UnitName>k__BackingField: EnemySwordKnight001
|
||||
<UnitType>k__BackingField: -1
|
||||
- <Idx>k__BackingField: enemy_sword_knight_unit_001
|
||||
<CaptainStatIdx>k__BackingField: enemy_stat_captain_004
|
||||
<SailorStatIdx>k__BackingField: enemy_stat_sailor_004
|
||||
<UnitName>k__BackingField: EnemySwordKnightUnit001
|
||||
<SailorCount>k__BackingField: 11
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: 2
|
||||
<UnitList>k__BackingField: []
|
||||
- <Idx>k__BackingField: unit_swordman_e_001
|
||||
<CaptainStatIdx>k__BackingField: ai_stat_captain_e_005
|
||||
<SailorStatIdx>k__BackingField: ai_stat_sailor_e_005
|
||||
<UnitName>k__BackingField: EnemySwordMan001
|
||||
<UnitType>k__BackingField: -1
|
||||
- <Idx>k__BackingField: enemy_swordman_unit_001
|
||||
<CaptainStatIdx>k__BackingField: enemy_stat_captain_005
|
||||
<SailorStatIdx>k__BackingField: enemy_stat_sailor_005
|
||||
<UnitName>k__BackingField: EnemySwordmanUnit001
|
||||
<SailorCount>k__BackingField: 8
|
||||
<AttackerType>k__BackingField: 1
|
||||
<OffenseType>k__BackingField: -1
|
95
BlueWater/Assets/02.Scripts/Data/So/EnemyViewDataSo.asset
Normal file
95
BlueWater/Assets/02.Scripts/Data/So/EnemyViewDataSo.asset
Normal file
@ -0,0 +1,95 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c71fe8f0398eaea4e9a1bee5d4a92a64, type: 3}
|
||||
m_Name: EnemyViewDataSo
|
||||
m_EditorClassIdentifier:
|
||||
enemyViewDataList:
|
||||
- <Idx>k__BackingField: enemy_view_salior_001
|
||||
<Backpack>k__BackingField: 1
|
||||
<LeftWeapon>k__BackingField: 2
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 16
|
||||
<RightWeapon>k__BackingField: -1
|
||||
<Body>k__BackingField: 11
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: enemy_view_salior_002
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: 1
|
||||
<Head>k__BackingField: 46
|
||||
<RightWeapon>k__BackingField: 27
|
||||
<Body>k__BackingField: 18
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: enemy_view_salior_003
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 35
|
||||
<RightWeapon>k__BackingField: 27
|
||||
<Body>k__BackingField: 17
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: enemy_view_salior_004
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: 9
|
||||
<Head>k__BackingField: 33
|
||||
<RightWeapon>k__BackingField: 6
|
||||
<Body>k__BackingField: 39
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: enemy_view_salior_005
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 25
|
||||
<RightWeapon>k__BackingField: 28
|
||||
<Body>k__BackingField: 29
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: enemy_view_captain_001
|
||||
<Backpack>k__BackingField: 1
|
||||
<LeftWeapon>k__BackingField: 2
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 16
|
||||
<RightWeapon>k__BackingField: -1
|
||||
<Body>k__BackingField: 11
|
||||
<Flag>k__BackingField: 1
|
||||
- <Idx>k__BackingField: enemy_view_captain_002
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: 1
|
||||
<Head>k__BackingField: 46
|
||||
<RightWeapon>k__BackingField: 27
|
||||
<Body>k__BackingField: 18
|
||||
<Flag>k__BackingField: 1
|
||||
- <Idx>k__BackingField: enemy_view_captain_003
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 35
|
||||
<RightWeapon>k__BackingField: 27
|
||||
<Body>k__BackingField: 17
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: enemy_view_captain_004
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: 9
|
||||
<Head>k__BackingField: 33
|
||||
<RightWeapon>k__BackingField: 6
|
||||
<Body>k__BackingField: 39
|
||||
<Flag>k__BackingField: 1
|
||||
- <Idx>k__BackingField: enemy_view_captain_005
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 25
|
||||
<RightWeapon>k__BackingField: 28
|
||||
<Body>k__BackingField: 29
|
||||
<Flag>k__BackingField: 1
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ae7ec952e14cea8499afd4a7b8ee8dfb
|
||||
guid: d4ed8ebcf48bbdb4d84caf4a4cab7c04
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
225
BlueWater/Assets/02.Scripts/Data/So/PirateStatDataSo.asset
Normal file
225
BlueWater/Assets/02.Scripts/Data/So/PirateStatDataSo.asset
Normal file
@ -0,0 +1,225 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f7c2e9bf391cbc2458b6eacd61baed5c, type: 3}
|
||||
m_Name: PirateStatDataSo
|
||||
m_EditorClassIdentifier:
|
||||
pirateStatDataList:
|
||||
- <Idx>k__BackingField: pirate_stat_sailor_001
|
||||
<ViewIdx>k__BackingField: pirate_view_sailor_001
|
||||
<UnitType>k__BackingField: 5
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 30
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 50
|
||||
<Def>k__BackingField: 0
|
||||
<MoveSpd>k__BackingField: 5
|
||||
<AtkCooldown>k__BackingField: 3
|
||||
<ViewRange>k__BackingField: 40
|
||||
<AtkRange>k__BackingField: 40
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 25
|
||||
<AvoidanceRate>k__BackingField: 20
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 1
|
||||
<Inaccuracy>k__BackingField: 4
|
||||
- <Idx>k__BackingField: pirate_stat_sailor_002
|
||||
<ViewIdx>k__BackingField: pirate_view_sailor_002
|
||||
<UnitType>k__BackingField: 6
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 50
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 50
|
||||
<Def>k__BackingField: 0
|
||||
<MoveSpd>k__BackingField: 5
|
||||
<AtkCooldown>k__BackingField: 2.5
|
||||
<ViewRange>k__BackingField: 15
|
||||
<AtkRange>k__BackingField: 3.5
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 0
|
||||
<AvoidanceRate>k__BackingField: 100
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: pirate_stat_sailor_003
|
||||
<ViewIdx>k__BackingField: pirate_view_sailor_003
|
||||
<UnitType>k__BackingField: 7
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 40
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 50
|
||||
<Def>k__BackingField: 5
|
||||
<MoveSpd>k__BackingField: 5.5
|
||||
<AtkCooldown>k__BackingField: 2
|
||||
<ViewRange>k__BackingField: 15
|
||||
<AtkRange>k__BackingField: 3.5
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 75
|
||||
<AvoidanceRate>k__BackingField: 20
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: pirate_stat_sailor_004
|
||||
<ViewIdx>k__BackingField: pirate_view_sailor_004
|
||||
<UnitType>k__BackingField: 8
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 60
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 30
|
||||
<Def>k__BackingField: 10
|
||||
<MoveSpd>k__BackingField: 5
|
||||
<AtkCooldown>k__BackingField: 1.5
|
||||
<ViewRange>k__BackingField: 10
|
||||
<AtkRange>k__BackingField: 3
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 50
|
||||
<AvoidanceRate>k__BackingField: 10
|
||||
<UsingShield>k__BackingField: 1
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: pirate_stat_sailor_005
|
||||
<ViewIdx>k__BackingField: pirate_view_sailor_005
|
||||
<UnitType>k__BackingField: 9
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 45
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 35
|
||||
<Def>k__BackingField: 5
|
||||
<MoveSpd>k__BackingField: 6
|
||||
<AtkCooldown>k__BackingField: 1.5
|
||||
<ViewRange>k__BackingField: 15
|
||||
<AtkRange>k__BackingField: 3
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 50
|
||||
<AvoidanceRate>k__BackingField: 30
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: pirate_stat_captain_001
|
||||
<ViewIdx>k__BackingField: pirate_view_captain_001
|
||||
<UnitType>k__BackingField: 5
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 150
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 50
|
||||
<Def>k__BackingField: 0
|
||||
<MoveSpd>k__BackingField: 5
|
||||
<AtkCooldown>k__BackingField: 3
|
||||
<ViewRange>k__BackingField: 40
|
||||
<AtkRange>k__BackingField: 40
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 25
|
||||
<AvoidanceRate>k__BackingField: 20
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 1
|
||||
<Inaccuracy>k__BackingField: 4
|
||||
- <Idx>k__BackingField: pirate_stat_captain_002
|
||||
<ViewIdx>k__BackingField: pirate_view_captain_002
|
||||
<UnitType>k__BackingField: 6
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 300
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 40
|
||||
<Def>k__BackingField: 10
|
||||
<MoveSpd>k__BackingField: 4.5
|
||||
<AtkCooldown>k__BackingField: 2
|
||||
<ViewRange>k__BackingField: 10
|
||||
<AtkRange>k__BackingField: 3.5
|
||||
<DefenseRange>k__BackingField: 10
|
||||
<ShieldPenetrationRate>k__BackingField: 75
|
||||
<AvoidanceRate>k__BackingField: 10
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: pirate_stat_captain_003
|
||||
<ViewIdx>k__BackingField: pirate_view_captain_003
|
||||
<UnitType>k__BackingField: 7
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 200
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 50
|
||||
<Def>k__BackingField: 5
|
||||
<MoveSpd>k__BackingField: 5.5
|
||||
<AtkCooldown>k__BackingField: 2
|
||||
<ViewRange>k__BackingField: 15
|
||||
<AtkRange>k__BackingField: 3.5
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 75
|
||||
<AvoidanceRate>k__BackingField: 20
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: pirate_stat_captain_004
|
||||
<ViewIdx>k__BackingField: pirate_view_captain_004
|
||||
<UnitType>k__BackingField: 8
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 300
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 30
|
||||
<Def>k__BackingField: 10
|
||||
<MoveSpd>k__BackingField: 5
|
||||
<AtkCooldown>k__BackingField: 1.5
|
||||
<ViewRange>k__BackingField: 10
|
||||
<AtkRange>k__BackingField: 3
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 50
|
||||
<AvoidanceRate>k__BackingField: 10
|
||||
<UsingShield>k__BackingField: 1
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
||||
- <Idx>k__BackingField: pirate_stat_captain_005
|
||||
<ViewIdx>k__BackingField: pirate_view_captain_005
|
||||
<UnitType>k__BackingField: 9
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: -1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<MaxHp>k__BackingField: 225
|
||||
<CurrentHp>k__BackingField: 0
|
||||
<Atk>k__BackingField: 35
|
||||
<Def>k__BackingField: 5
|
||||
<MoveSpd>k__BackingField: 6
|
||||
<AtkCooldown>k__BackingField: 1.5
|
||||
<ViewRange>k__BackingField: 15
|
||||
<AtkRange>k__BackingField: 3
|
||||
<DefenseRange>k__BackingField: 0
|
||||
<ShieldPenetrationRate>k__BackingField: 50
|
||||
<AvoidanceRate>k__BackingField: 30
|
||||
<UsingShield>k__BackingField: 0
|
||||
<PenetrationResistivity>k__BackingField: 0
|
||||
<UsingBow>k__BackingField: 0
|
||||
<Inaccuracy>k__BackingField: 0
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a017fce7d59b4fc4cb88332a7854eef3
|
||||
guid: 0f0ed8929be00534e97398bb55d8c541
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
@ -9,75 +9,68 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3cfd6c9178f4c2a48a79549b238ac772, type: 3}
|
||||
m_Name: UnitDataSo
|
||||
m_Script: {fileID: 11500000, guid: 6860dacd36ec53343bc4ee3879adc0e9, type: 3}
|
||||
m_Name: PirateUnitStatDataSo
|
||||
m_EditorClassIdentifier:
|
||||
unitDataList:
|
||||
- <Idx>k__BackingField: unit_archer_p_001
|
||||
<CaptainStatIdx>k__BackingField: ai_stat_captain_p_001
|
||||
<SailorStatIdx>k__BackingField: ai_stat_sailor_p_001
|
||||
pirateUnitStatDataList:
|
||||
- <Idx>k__BackingField: pirate_archer_unit_001
|
||||
<CaptainStatIdx>k__BackingField: pirate_stat_captain_001
|
||||
<SailorStatIdx>k__BackingField: pirate_stat_sailor_001
|
||||
<UnitName>k__BackingField: Legolas
|
||||
<UnitType>k__BackingField: -1
|
||||
<SailorCount>k__BackingField: 8
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: 0
|
||||
<DefenseType>k__BackingField: -1
|
||||
<UnitList>k__BackingField: []
|
||||
- <Idx>k__BackingField: unit_archer_p_002
|
||||
<CaptainStatIdx>k__BackingField: ai_stat_captain_p_001
|
||||
<SailorStatIdx>k__BackingField: ai_stat_sailor_p_001
|
||||
- <Idx>k__BackingField: pirate_archer_unit_002
|
||||
<CaptainStatIdx>k__BackingField: pirate_stat_captain_001
|
||||
<SailorStatIdx>k__BackingField: pirate_stat_sailor_001
|
||||
<UnitName>k__BackingField: Robin Hood
|
||||
<UnitType>k__BackingField: -1
|
||||
<SailorCount>k__BackingField: 5
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: 0
|
||||
<DefenseType>k__BackingField: -1
|
||||
<UnitList>k__BackingField: []
|
||||
- <Idx>k__BackingField: unit_axeman_p_001
|
||||
<CaptainStatIdx>k__BackingField: ai_stat_captain_p_002
|
||||
<SailorStatIdx>k__BackingField: ai_stat_sailor_p_002
|
||||
- <Idx>k__BackingField: pirate_axeman_unit_001
|
||||
<CaptainStatIdx>k__BackingField: pirate_stat_captain_002
|
||||
<SailorStatIdx>k__BackingField: pirate_stat_sailor_002
|
||||
<UnitName>k__BackingField: Olaf
|
||||
<UnitType>k__BackingField: -1
|
||||
<SailorCount>k__BackingField: 5
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: 0
|
||||
<DefenseType>k__BackingField: -1
|
||||
<UnitList>k__BackingField: []
|
||||
- <Idx>k__BackingField: unit_spearman_p_001
|
||||
<CaptainStatIdx>k__BackingField: ai_stat_captain_p_003
|
||||
<SailorStatIdx>k__BackingField: ai_stat_sailor_p_003
|
||||
- <Idx>k__BackingField: pirate_spearman_unit_001
|
||||
<CaptainStatIdx>k__BackingField: pirate_stat_captain_003
|
||||
<SailorStatIdx>k__BackingField: pirate_stat_sailor_003
|
||||
<UnitName>k__BackingField: Lancer
|
||||
<UnitType>k__BackingField: -1
|
||||
<SailorCount>k__BackingField: 7
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: 1
|
||||
<DefenseType>k__BackingField: -1
|
||||
<UnitList>k__BackingField: []
|
||||
- <Idx>k__BackingField: unit_sword_knight_p_001
|
||||
<CaptainStatIdx>k__BackingField: ai_stat_captain_p_004
|
||||
<SailorStatIdx>k__BackingField: ai_stat_sailor_p_004
|
||||
- <Idx>k__BackingField: pirate_spear_knight_unit_001
|
||||
<CaptainStatIdx>k__BackingField: pirate_stat_captain_004
|
||||
<SailorStatIdx>k__BackingField: pirate_stat_sailor_004
|
||||
<UnitName>k__BackingField: Achilles
|
||||
<UnitType>k__BackingField: -1
|
||||
<SailorCount>k__BackingField: 3
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: 0
|
||||
<DefenseType>k__BackingField: -1
|
||||
<UnitList>k__BackingField: []
|
||||
- <Idx>k__BackingField: unit_swordman_p_001
|
||||
<CaptainStatIdx>k__BackingField: ai_stat_captain_p_005
|
||||
<SailorStatIdx>k__BackingField: ai_stat_sailor_p_005
|
||||
- <Idx>k__BackingField: pirate_swordman_unit_001
|
||||
<CaptainStatIdx>k__BackingField: pirate_stat_captain_005
|
||||
<SailorStatIdx>k__BackingField: pirate_stat_sailor_005
|
||||
<UnitName>k__BackingField: Aragorn
|
||||
<UnitType>k__BackingField: -1
|
||||
<SailorCount>k__BackingField: 5
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: 0
|
||||
<DefenseType>k__BackingField: -1
|
||||
<UnitList>k__BackingField: []
|
||||
- <Idx>k__BackingField: unit_swordman_p_002
|
||||
<CaptainStatIdx>k__BackingField: ai_stat_captain_p_005
|
||||
<SailorStatIdx>k__BackingField: ai_stat_sailor_p_005
|
||||
- <Idx>k__BackingField: pirate_swordman_unit_002
|
||||
<CaptainStatIdx>k__BackingField: pirate_stat_captain_005
|
||||
<SailorStatIdx>k__BackingField: pirate_stat_sailor_005
|
||||
<UnitName>k__BackingField: King Arthur
|
||||
<UnitType>k__BackingField: -1
|
||||
<SailorCount>k__BackingField: 11
|
||||
<AttackerType>k__BackingField: -1
|
||||
<OffenseType>k__BackingField: 0
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6cd374040492d94498f1cce6c3a10e14
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
95
BlueWater/Assets/02.Scripts/Data/So/PirateViewDataSo.asset
Normal file
95
BlueWater/Assets/02.Scripts/Data/So/PirateViewDataSo.asset
Normal file
@ -0,0 +1,95 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f28df59e93ab2804789a4e010c4f21e1, type: 3}
|
||||
m_Name: PirateViewDataSo
|
||||
m_EditorClassIdentifier:
|
||||
pirateViewDataList:
|
||||
- <Idx>k__BackingField: pirate_view_salior_001
|
||||
<Backpack>k__BackingField: 0
|
||||
<LeftWeapon>k__BackingField: 1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 11
|
||||
<RightWeapon>k__BackingField: -1
|
||||
<Body>k__BackingField: 1
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: pirate_view_salior_002
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 50
|
||||
<RightWeapon>k__BackingField: 31
|
||||
<Body>k__BackingField: 58
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: pirate_view_salior_003
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 36
|
||||
<RightWeapon>k__BackingField: 27
|
||||
<Body>k__BackingField: 60
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: pirate_view_salior_004
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: 2
|
||||
<Head>k__BackingField: 22
|
||||
<RightWeapon>k__BackingField: 24
|
||||
<Body>k__BackingField: 58
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: pirate_view_salior_005
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 5
|
||||
<RightWeapon>k__BackingField: 12
|
||||
<Body>k__BackingField: 0
|
||||
<Flag>k__BackingField: -1
|
||||
- <Idx>k__BackingField: pirate_view_captain_001
|
||||
<Backpack>k__BackingField: 0
|
||||
<LeftWeapon>k__BackingField: 1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 11
|
||||
<RightWeapon>k__BackingField: -1
|
||||
<Body>k__BackingField: 1
|
||||
<Flag>k__BackingField: 9
|
||||
- <Idx>k__BackingField: pirate_view_captain_002
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 50
|
||||
<RightWeapon>k__BackingField: 31
|
||||
<Body>k__BackingField: 58
|
||||
<Flag>k__BackingField: 9
|
||||
- <Idx>k__BackingField: pirate_view_captain_003
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 36
|
||||
<RightWeapon>k__BackingField: 27
|
||||
<Body>k__BackingField: 60
|
||||
<Flag>k__BackingField: 9
|
||||
- <Idx>k__BackingField: pirate_view_captain_004
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: 2
|
||||
<Head>k__BackingField: 22
|
||||
<RightWeapon>k__BackingField: 24
|
||||
<Body>k__BackingField: 58
|
||||
<Flag>k__BackingField: 9
|
||||
- <Idx>k__BackingField: pirate_view_captain_005
|
||||
<Backpack>k__BackingField: -1
|
||||
<LeftWeapon>k__BackingField: -1
|
||||
<LeftShield>k__BackingField: -1
|
||||
<Head>k__BackingField: 5
|
||||
<RightWeapon>k__BackingField: 12
|
||||
<Body>k__BackingField: 0
|
||||
<Flag>k__BackingField: 9
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 33ac25d6eca8f6447a342dfb44a2a282
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,12 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
[CreateAssetMenu(fileName = "UnitDataSo", menuName = "ScriptableObjects/UnitData", order = 2)]
|
||||
public class UnitDataSo : ScriptableObject
|
||||
{
|
||||
public List<Unit> unitDataList = new(GlobalValue.UNIT_DATA_CAPACITY);
|
||||
}
|
||||
}
|
@ -8,17 +8,23 @@ namespace BlueWaterProject
|
||||
public class DataManager : Singleton<DataManager>
|
||||
{
|
||||
[field: Title("Scriptable Object")]
|
||||
[field: SerializeField] public AiViewDataSo AiViewDataSo { get; private set; }
|
||||
private Dictionary<string, AiView> aiViewDictionary;
|
||||
[field: SerializeField] public EnemyViewDataSo EnemyViewDataSo { get; private set; }
|
||||
private Dictionary<string, EnemyView> enemyViewDictionary;
|
||||
|
||||
[field: SerializeField] public PirateViewDataSo PirateViewDataSo { get; private set; }
|
||||
private Dictionary<string, PirateView> pirateViewDictionary;
|
||||
|
||||
[field: SerializeField] public AiStatDataSo AiStatDataSo { get; private set; }
|
||||
private Dictionary<string, AiStat> aiStatDictionary;
|
||||
[field: SerializeField] public EnemyStatDataSo EnemyStatDataSo { get; private set; }
|
||||
private Dictionary<string, EnemyStat> enemyStatDictionary;
|
||||
|
||||
[field: SerializeField] public PirateStatDataSo PirateStatDataSo { get; private set; }
|
||||
private Dictionary<string, PirateStat> pirateStatDictionary;
|
||||
|
||||
[field: SerializeField] public UnitDataSo UnitDataSo { get; private set; }
|
||||
private Dictionary<string, Unit> unitDictionary;
|
||||
|
||||
[field: SerializeField] public UnitDataSo EnemyUnitDataSo { get; private set; }
|
||||
private Dictionary<string, Unit> enemyUnitDictionary;
|
||||
[field: SerializeField] public EnemyUnitStatDataSo EnemyUnitStatDataSo { get; private set; }
|
||||
private Dictionary<string, EnemyUnitStat> enemyUnitDictionary;
|
||||
|
||||
[field: SerializeField] public PirateUnitStatDataSo PirateUnitDataSo { get; private set; }
|
||||
private Dictionary<string, PirateUnitStat> pirateUnitDictionary;
|
||||
|
||||
[field: SerializeField] public CardDataSo CardDataSo { get; private set; }
|
||||
private Dictionary<string, Card> cardDictionary;
|
||||
@ -48,9 +54,12 @@ namespace BlueWaterProject
|
||||
|
||||
private void InitDictionary()
|
||||
{
|
||||
aiViewDictionary = CreateDictionaryFromList(AiViewDataSo.aiViewDataList, GlobalValue.AI_VIEW_DATA_CAPACITY);
|
||||
aiStatDictionary = CreateDictionaryFromList(AiStatDataSo.aiStatDataList, GlobalValue.ENEMY_STAT_DATA_CAPACITY);
|
||||
unitDictionary = CreateDictionaryFromList(UnitDataSo.unitDataList, GlobalValue.UNIT_DATA_CAPACITY);
|
||||
enemyViewDictionary = CreateDictionaryFromList(EnemyViewDataSo.enemyViewDataList, GlobalValue.ENEMY_VIEW_DATA_CAPACITY);
|
||||
pirateViewDictionary = CreateDictionaryFromList(PirateViewDataSo.pirateViewDataList,GlobalValue.PIRATE_VIEW_DATA_CAPACITY);
|
||||
enemyStatDictionary = CreateDictionaryFromList(EnemyStatDataSo.enemyStatDataList, GlobalValue.ENEMY_STAT_DATA_CAPACITY);
|
||||
pirateStatDictionary = CreateDictionaryFromList(PirateStatDataSo.pirateStatDataList, GlobalValue.ENEMY_STAT_DATA_CAPACITY);
|
||||
enemyUnitDictionary = CreateDictionaryFromList(EnemyUnitStatDataSo.enemyUnitStatDataList, GlobalValue.ENEMY_UNIT_STAT_DATA_CAPACITY);
|
||||
pirateUnitDictionary = CreateDictionaryFromList(PirateUnitDataSo.pirateUnitStatDataList, GlobalValue.PIRATE_UNIT_STAT_DATA_CAPACITY);
|
||||
cardDictionary = CreateDictionaryFromList(CardDataSo.cardDataList, GlobalValue.CARD_DATA_CAPACITY);
|
||||
}
|
||||
|
||||
@ -69,17 +78,21 @@ namespace BlueWaterProject
|
||||
return newDictionary;
|
||||
}
|
||||
|
||||
public AiView GetAiViewDictionaryKey(string idx) => aiViewDictionary[idx] != null ? aiViewDictionary[idx] : null;
|
||||
public AiStat GetAiStatDictionaryKey(string idx) => aiStatDictionary[idx] != null ? aiStatDictionary[idx] : null;
|
||||
public Unit GetUnitDictionaryKey(string idx) => unitDictionary[idx] != null ? unitDictionary[idx] : null;
|
||||
public Unit GetEnemyUnitDictionaryKey(string idx) => enemyUnitDictionary[idx] != null ? enemyUnitDictionary[idx] : null;
|
||||
public EnemyView GetEnemyViewDictionaryFromKey(string idx) => enemyViewDictionary[idx] != null ? enemyViewDictionary[idx] : null;
|
||||
public PirateView GetPirateViewDictionaryFromKey(string idx) => pirateViewDictionary[idx] != null ? pirateViewDictionary[idx] : null;
|
||||
public EnemyStat GetEnemyStatDictionaryFromKey(string idx) => enemyStatDictionary[idx] != null ? enemyStatDictionary[idx] : null;
|
||||
public PirateStat GetPirateStatDictionaryFromKey(string idx) => pirateStatDictionary[idx] != null ? pirateStatDictionary[idx] : null;
|
||||
public EnemyUnitStat GetEnemyUnitStatDictionaryFromKey(string idx) => enemyUnitDictionary[idx] != null ? enemyUnitDictionary[idx] : null;
|
||||
public PirateUnitStat GetPirateUnitStatDictionaryFromKey(string idx) => pirateUnitDictionary[idx] != null ? pirateUnitDictionary[idx] : null;
|
||||
public Card GetCardDictionaryFromKey(string idx) => cardDictionary[idx] != null ? cardDictionary[idx] : null;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public AiView GetAiViewSoKey(string idx) => AiViewDataSo.aiViewDataList.Find(item => item.Idx == idx);
|
||||
public AiStat GetAiStatSoKey(string idx) => AiStatDataSo.aiStatDataList.Find(item => item.Idx == idx);
|
||||
public Unit GetUnitSoKey(string idx) => UnitDataSo.unitDataList.Find(item => item.Idx == idx);
|
||||
public Unit GetEnemyUnitSoKey(string idx) => EnemyUnitDataSo.unitDataList.Find(item => item.Idx == idx);
|
||||
public EnemyView GetEnemyViewSoFromKey(string idx) => EnemyViewDataSo.enemyViewDataList.Find(item => item.Idx == idx);
|
||||
public PirateView GetPirateViewSoFromKey(string idx) => PirateViewDataSo.pirateViewDataList.Find(item => item.Idx == idx);
|
||||
public EnemyStat GetEnemyStatSoFromKey(string idx) => EnemyStatDataSo.enemyStatDataList.Find(item => item.Idx == idx);
|
||||
public PirateStat GetPirateStatSoFromKey(string idx) => PirateStatDataSo.pirateStatDataList.Find(item => item.Idx == idx);
|
||||
public EnemyUnitStat GetEnemyUnitStatSoFromKey(string idx) => EnemyUnitStatDataSo.enemyUnitStatDataList.Find(item => item.Idx == idx);
|
||||
public PirateUnitStat GetPirateUnitStatSoFromKey(string idx) => PirateUnitDataSo.pirateUnitStatDataList.Find(item => item.Idx == idx);
|
||||
#endif
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public interface IAiBase
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public interface IAiMover : IAiBase
|
||||
{
|
||||
// Properties
|
||||
bool IsCommanded { get; set; }
|
||||
|
||||
// Functions
|
||||
|
||||
void CommandMove(Vector3 targetPos);
|
||||
|
||||
IEnumerator CommandMoveCoroutine(Vector3 targetPos);
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public interface IAiStat : IAiBase
|
||||
{
|
||||
public AiStat AiStat { get; set; }
|
||||
public float GetCurrentHp();
|
||||
public void SetCurrentHp(float value);
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public interface IDamageable2
|
||||
{
|
||||
public void TakeDamage(float damage);
|
||||
}
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4fdb6e266dc14508a1b2645a7783193c
|
||||
timeCreated: 1693456465
|
@ -1,27 +0,0 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public interface IFieldOfView : IAiStat
|
||||
{
|
||||
// Properties
|
||||
bool IsDrawGizmosInFieldOfView { get; set; }
|
||||
|
||||
LayerMask TargetLayer { get; set; }
|
||||
|
||||
Collider[] ColliderWithinRange { get; set; }
|
||||
|
||||
Transform TargetTransform { get; set; }
|
||||
|
||||
// Functions
|
||||
void DrawGizmosInFieldOfView();
|
||||
|
||||
IEnumerator FindTargetInOffense();
|
||||
|
||||
IEnumerator FindTargetInDefense();
|
||||
|
||||
void UpdateLookAtTarget();
|
||||
}
|
||||
}
|
@ -13,7 +13,7 @@ namespace BlueWaterProject
|
||||
|
||||
[field: SerializeField] public List<Transform> HouseList { get; private set; }
|
||||
|
||||
[field: SerializeField] public List<UnitController> UnitList { get; private set; }
|
||||
[field: SerializeField] public List<EnemyUnit> UnitList { get; private set; }
|
||||
|
||||
[field: SerializeField] public List<Transform> EnemyList { get; private set; }
|
||||
|
||||
@ -28,7 +28,7 @@ namespace BlueWaterProject
|
||||
TargetAllList = null;
|
||||
}
|
||||
|
||||
public IslandInfo(string islandName, List<Transform> houseList, List<UnitController> unitList, List<Transform> enemyList, List<Transform> targetAllList)
|
||||
public IslandInfo(string islandName, List<Transform> houseList, List<EnemyUnit> unitList, List<Transform> enemyList, List<Transform> targetAllList)
|
||||
{
|
||||
IslandName = islandName;
|
||||
HouseList = houseList;
|
||||
@ -70,7 +70,7 @@ namespace BlueWaterProject
|
||||
}
|
||||
}
|
||||
|
||||
UnitList = new List<UnitController>(20);
|
||||
UnitList = new List<EnemyUnit>(20);
|
||||
|
||||
var units = transform.Find("Units");
|
||||
|
||||
@ -80,7 +80,7 @@ namespace BlueWaterProject
|
||||
{
|
||||
if (!unit.CompareTag("Unit") || !unit.gameObject.activeSelf) continue;
|
||||
|
||||
UnitList.Add(unit.GetComponent<UnitController>());
|
||||
UnitList.Add(unit.GetComponent<EnemyUnit>());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,10 +4,12 @@ namespace BlueWaterProject
|
||||
public class GlobalValue
|
||||
{
|
||||
public const int CARD_DATA_CAPACITY = 50;
|
||||
public const int AI_VIEW_DATA_CAPACITY = 50;
|
||||
public const int ENEMY_VIEW_DATA_CAPACITY = 50;
|
||||
public const int PIRATE_VIEW_DATA_CAPACITY = 50;
|
||||
public const int ENEMY_STAT_DATA_CAPACITY = 50;
|
||||
public const int PIRATE_STAT_DATA_CAPACITY = 50;
|
||||
public const int UNIT_DATA_CAPACITY = 50;
|
||||
public const int ENEMY_UNIT_STAT_DATA_CAPACITY = 50;
|
||||
public const int PIRATE_UNIT_STAT_DATA_CAPACITY = 50;
|
||||
public const int ISLAND_DATA_CAPACITY = 50;
|
||||
public const int ONE_UNIT_CAPACITY = 16;
|
||||
public const int AI_ANIMATOR_CAPACITY = 10;
|
||||
|
@ -88,7 +88,7 @@ namespace BlueWaterProject
|
||||
UnityEngine.Debug.Log($"Call {className}.{methodName}");
|
||||
}
|
||||
|
||||
public static float CalcDamage(float attackerPower, float attackerShieldPenetrationRate, AiStat defender)
|
||||
public static float CalcDamage(float attackerPower, float attackerShieldPenetrationRate, EnemyStat defender)
|
||||
{
|
||||
var finalDamage = 0f;
|
||||
|
||||
|
@ -27,7 +27,7 @@ namespace BlueWaterProject
|
||||
|
||||
public Coroutine shootCoroutine;
|
||||
private Transform attackerTransform;
|
||||
private AiStat attackerStat;
|
||||
private EnemyStat attackerStat;
|
||||
private Rigidbody arrowRigidbody;
|
||||
private IObjectPool<Arrow> managedArrowPool;
|
||||
|
||||
@ -164,7 +164,7 @@ namespace BlueWaterProject
|
||||
/// <summary>
|
||||
/// 화살이 발사 되기 직전에 필요한 데이터들을 입력받는 함수
|
||||
/// </summary>
|
||||
public void SetShootingArrow(Vector3 shootLocationPos, Vector3? attackPos, Vector3 targetPosition, AiStat attackerAiStat, EAiType aiType, float inaccuracyValue, bool isOffense)
|
||||
public void SetShootingArrow(Vector3 shootLocationPos, Vector3? attackPos, Vector3 targetPosition, EnemyStat attackerAiStat, EAiType aiType, float inaccuracyValue, bool isOffense)
|
||||
{
|
||||
isAttacked = false;
|
||||
transform.position = shootLocationPos;
|
||||
|
@ -11,7 +11,7 @@ namespace BlueWaterProject
|
||||
private bool isAttacked;
|
||||
|
||||
private EAiType attackerAiType;
|
||||
private AiStat attackerStat;
|
||||
private EnemyStat attackerStat;
|
||||
private bool isInit;
|
||||
private bool canAttack;
|
||||
|
||||
@ -76,7 +76,7 @@ namespace BlueWaterProject
|
||||
|
||||
public void SetIsAttacked(bool value) => isAttacked = value;
|
||||
public void SetAttackerAiType(EAiType value) => attackerAiType = value;
|
||||
public void SetAttackerStat(AiStat value) => attackerStat = value;
|
||||
public void SetAttackerStat(EnemyStat value) => attackerStat = value;
|
||||
public void SetCanAttack(bool value) => canAttack = value;
|
||||
|
||||
#endregion
|
||||
|
Loading…
Reference in New Issue
Block a user