closed #9 근거리 Ai 공격, 충돌 테스트
#7 근거리 무기(MeleeWeapon) 추가 #8 부대 제어 수정 필요(기획 변경) - Ai 버벅이던 현상 수정(Rigidbody interpolate 문제) - UnitController 상세화(인스펙터창) - 오펜스 관련 Ai 기본 설정 - Props 레이어 추가, House 태그 추가 - Physic 충돌 레이어 변경 - Ai 전체 프리팹 수정 - 테스트용 오펜스 ai 타겟 건물 추가 - Swordman 애니메이션 이벤트 누락 수정
This commit is contained in:
parent
ecb6f47713
commit
13cfeb3315
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AI;
|
||||
@ -12,16 +13,42 @@ namespace BlueWaterProject
|
||||
public enum AttackerType
|
||||
{
|
||||
NONE,
|
||||
PLAYER,
|
||||
PIRATE,
|
||||
ENEMY
|
||||
OFFENSE,
|
||||
DEFENSE
|
||||
}
|
||||
|
||||
public enum OffenseType
|
||||
{
|
||||
NONE,
|
||||
NORMAL,
|
||||
ONLY_HOUSE
|
||||
}
|
||||
|
||||
public enum DefenseType
|
||||
{
|
||||
NONE,
|
||||
NORMAL,
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public abstract class AiController : MonoBehaviour, IDamageable, IFieldOfView, IAiMover
|
||||
public class AiController : MonoBehaviour, IDamageable, IFieldOfView, IAiMover
|
||||
{
|
||||
#region Property and variable
|
||||
|
||||
[Title("AiType")]
|
||||
[EnableIf("alwaysFalse")]
|
||||
[EnumToggleButtons]
|
||||
[SerializeField] protected AttackerType attackerType;
|
||||
private bool alwaysFalse = false;
|
||||
|
||||
[EnableIf("alwaysFalse")]
|
||||
[ShowIf("attackerType", AttackerType.OFFENSE)]
|
||||
[SerializeField] private OffenseType offenseType;
|
||||
|
||||
[EnableIf("alwaysFalse")]
|
||||
[ShowIf("attackerType", AttackerType.DEFENSE)]
|
||||
[SerializeField] private DefenseType defenseType;
|
||||
|
||||
[Title("Skin")]
|
||||
[Tooltip("SkinnedMeshRenderer, MeshRenderer의 Material을 모두 담고 있는 리스트")]
|
||||
[SerializeField] protected List<Material> skinMaterialList = new(10);
|
||||
@ -35,10 +62,10 @@ namespace BlueWaterProject
|
||||
[Tooltip("캐릭터가 선택되었을 때 색상")]
|
||||
[SerializeField] protected Color selectedSkinColor = Color.blue;
|
||||
|
||||
[SerializeField] protected bool isAttacking;
|
||||
[SerializeField] protected AttackerType attackerType;
|
||||
protected bool isAttacking;
|
||||
private Vector3 commandedPos;
|
||||
|
||||
public IslandInfo IslandInfo { get; set; }
|
||||
protected Animator aiAnimator;
|
||||
protected NavMeshAgent navMeshAgent;
|
||||
private UnitController myUnitController;
|
||||
@ -46,6 +73,8 @@ namespace BlueWaterProject
|
||||
private UnitSelection unitSelection;
|
||||
private CapsuleCollider myCollider;
|
||||
private CapsuleCollider hitBoxCollider;
|
||||
protected Transform weaponLocation;
|
||||
protected MeleeWeapon meleeWeapon;
|
||||
|
||||
private static readonly int SpeedHash = Animator.StringToHash("Speed");
|
||||
protected static readonly int AttackHash = Animator.StringToHash("Attack");
|
||||
@ -55,20 +84,14 @@ namespace BlueWaterProject
|
||||
private static readonly int ShieldHash = Animator.StringToHash("Shield");
|
||||
private static readonly int OutlineColorHash = Shader.PropertyToID("_OutlineColor");
|
||||
|
||||
private static readonly WaitForSeconds FindTargetWaitTime = new(0.5f);
|
||||
|
||||
#endregion
|
||||
|
||||
#region abstract function
|
||||
|
||||
protected abstract void Attack();
|
||||
protected static readonly WaitForSeconds FindTargetWaitTime = new(0.5f);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity built-in function
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private void OnDrawGizmosSelected()
|
||||
protected virtual void OnDrawGizmosSelected()
|
||||
{
|
||||
DrawGizmosInFieldOfView();
|
||||
}
|
||||
@ -85,29 +108,41 @@ namespace BlueWaterProject
|
||||
|
||||
unitSelection = FindObjectOfType<UnitSelection>();
|
||||
|
||||
if (gameObject.layer == LayerMask.NameToLayer("Player"))
|
||||
{
|
||||
attackerType = AttackerType.PLAYER;
|
||||
}
|
||||
else if (gameObject.layer == LayerMask.NameToLayer("Pirate"))
|
||||
{
|
||||
attackerType = AttackerType.PIRATE;
|
||||
}
|
||||
else if (gameObject.layer == LayerMask.NameToLayer("Enemy"))
|
||||
{
|
||||
attackerType = AttackerType.ENEMY;
|
||||
}
|
||||
SetAttackerType();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
SetCurrentHp(AiStat.maxHp);
|
||||
navMeshAgent.speed = AiStat.moveSpd;
|
||||
SetMoveSpeed(AiStat.moveSpd);
|
||||
|
||||
StartCoroutine(nameof(FindTarget));
|
||||
switch (attackerType)
|
||||
{
|
||||
case AttackerType.NONE:
|
||||
break;
|
||||
case AttackerType.OFFENSE:
|
||||
StartCoroutine(nameof(FindTargetInOffense));
|
||||
break;
|
||||
case AttackerType.DEFENSE:
|
||||
StartCoroutine(nameof(FindTarget));
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
Attack();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
RemoveIslandInfo();
|
||||
StopAllCoroutines();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
aiAnimator.SetFloat(SpeedHash, navMeshAgent.velocity.normalized.magnitude);
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
UpdateLookAtTarget();
|
||||
@ -149,12 +184,13 @@ namespace BlueWaterProject
|
||||
[field: SerializeField] public AiStat AiStat { get; set; } = new();
|
||||
|
||||
public float GetCurrentHp() => AiStat.currentHp;
|
||||
public void SetCurrentHp(float value) => AiStat.currentHp = value;
|
||||
|
||||
public void TakeDamage(AiStat attacker, AiStat defender, Vector3? attackPos = null)
|
||||
{
|
||||
if (!TargetTransform && attackPos != null)
|
||||
{
|
||||
BeAttackedMovement((Vector3)attackPos);
|
||||
//BeAttackedMovement((Vector3)attackPos);
|
||||
}
|
||||
|
||||
// 회피 성공 체크
|
||||
@ -178,10 +214,12 @@ namespace BlueWaterProject
|
||||
// 죽었는지 체크
|
||||
if (changeHp == 0f)
|
||||
{
|
||||
RemoveIslandInfo();
|
||||
|
||||
StopAllCoroutines();
|
||||
navMeshAgent.enabled = false;
|
||||
myCollider.enabled = false;
|
||||
hitBoxCollider.enabled = false;
|
||||
navMeshAgent.isStopped = true;
|
||||
navMeshAgent.velocity = Vector3.zero;
|
||||
|
||||
var randomValue = Random.Range(0, 2);
|
||||
aiAnimator.SetInteger(DeathTypeHash, randomValue);
|
||||
@ -210,13 +248,10 @@ namespace BlueWaterProject
|
||||
|
||||
[field: SerializeField] public Collider[] ColliderWithinRange { get; set; } = new Collider[TARGET_MAX_SIZE];
|
||||
|
||||
//[field: SerializeField] public List<TargetInfo> TargetInfoList { get; set; } = new(TARGET_MAX_SIZE);
|
||||
|
||||
[field: SerializeField] public IAiStat IaiStat { get; set; }
|
||||
|
||||
[field: SerializeField] public Transform TargetTransform { get; set; }
|
||||
|
||||
//[field: SerializeField] public TargetInfo TargetInfo { get; set; } = new();
|
||||
|
||||
private const int TARGET_MAX_SIZE = 30;
|
||||
|
||||
@ -270,9 +305,83 @@ namespace BlueWaterProject
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateLookAtTarget()
|
||||
public IEnumerator FindTargetInOffense()
|
||||
{
|
||||
if (TargetTransform)
|
||||
while (true)
|
||||
{
|
||||
if (CanAttack())
|
||||
{
|
||||
yield return FindTargetWaitTime;
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (offenseType)
|
||||
{
|
||||
case OffenseType.NONE:
|
||||
break;
|
||||
case OffenseType.NORMAL:
|
||||
if (IslandInfo.EnemyList.Count > 0)
|
||||
{
|
||||
SetNearestTargetDestination(IslandInfo.EnemyList);
|
||||
}
|
||||
else if (IslandInfo.HouseList.Count > 0)
|
||||
{
|
||||
SetNearestTargetDestination(IslandInfo.HouseList);
|
||||
}
|
||||
break;
|
||||
case OffenseType.ONLY_HOUSE:
|
||||
if (navMeshAgent.pathStatus == NavMeshPathStatus.PathPartial)
|
||||
{
|
||||
SetNearestTargetDestination(IslandInfo.TargetAllList);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IslandInfo.HouseList.Count > 0)
|
||||
{
|
||||
SetNearestTargetDestination(IslandInfo.HouseList);
|
||||
}
|
||||
else if (IslandInfo.EnemyList.Count > 0)
|
||||
{
|
||||
SetNearestTargetDestination(IslandInfo.EnemyList);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
yield return FindTargetWaitTime;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetNearestTargetDestination<T>(List<T> targetList)
|
||||
{
|
||||
if (targetList.Count <= 0) return;
|
||||
|
||||
var nearestTarget = targetList.OrderBy(t =>
|
||||
{
|
||||
var targetTransform = (Transform)(object)t;
|
||||
var targetCollider = targetTransform.GetComponent<Collider>();
|
||||
|
||||
if (!targetCollider)
|
||||
{
|
||||
return float.MaxValue;
|
||||
}
|
||||
|
||||
var closestPoint = targetCollider.ClosestPoint(transform.position);
|
||||
return Vector3.Distance(transform.position, closestPoint);
|
||||
})
|
||||
.FirstOrDefault();
|
||||
|
||||
if (nearestTarget == null) return;
|
||||
|
||||
TargetTransform = (Transform)(object)nearestTarget;
|
||||
navMeshAgent.SetDestination(TargetTransform.position);
|
||||
}
|
||||
|
||||
public virtual void UpdateLookAtTarget()
|
||||
{
|
||||
if (CanAttack())
|
||||
{
|
||||
navMeshAgent.updateRotation = false;
|
||||
|
||||
@ -300,44 +409,22 @@ namespace BlueWaterProject
|
||||
|
||||
public void UpdateMovement()
|
||||
{
|
||||
aiAnimator.SetFloat(SpeedHash, navMeshAgent.velocity.normalized.magnitude);
|
||||
|
||||
if (IsCommanded)
|
||||
{
|
||||
if (navMeshAgent.destination == commandedPos)
|
||||
{
|
||||
if (navMeshAgent.remainingDistance <= navMeshAgent.stoppingDistance)
|
||||
{
|
||||
IsCommanded = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isAttacking) return;
|
||||
|
||||
navMeshAgent.SetDestination(commandedPos);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!TargetTransform) return;
|
||||
|
||||
switch (AttackMoveType)
|
||||
{
|
||||
case MoveType.NONE:
|
||||
break;
|
||||
case MoveType.FIXED:
|
||||
break;
|
||||
case MoveType.MOVE:
|
||||
if (Vector3.Distance(transform.position, TargetTransform.position) > AiStat.atkRange)
|
||||
{
|
||||
navMeshAgent.SetDestination(TargetTransform.position);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
// if (IsCommanded)
|
||||
// {
|
||||
// if (navMeshAgent.destination == commandedPos)
|
||||
// {
|
||||
// if (navMeshAgent.remainingDistance <= navMeshAgent.stoppingDistance)
|
||||
// {
|
||||
// IsCommanded = false;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (isAttacking) return;
|
||||
//
|
||||
// navMeshAgent.SetDestination(commandedPos);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
public void BeAttackedMovement(Vector3 attackPos)
|
||||
@ -373,6 +460,53 @@ namespace BlueWaterProject
|
||||
|
||||
#region Custom function
|
||||
|
||||
protected virtual void Attack()
|
||||
{
|
||||
StartCoroutine(nameof(AttackAnimation));
|
||||
}
|
||||
|
||||
private IEnumerator AttackAnimation()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
if (!CanAttack())
|
||||
{
|
||||
isAttacking = false;
|
||||
yield return FindTargetWaitTime;
|
||||
continue;
|
||||
}
|
||||
|
||||
isAttacking = true;
|
||||
meleeWeapon.SetIsAttacked(false);
|
||||
meleeWeapon.SetAttackerStat(AiStat);
|
||||
aiAnimator.SetTrigger(AttackHash);
|
||||
|
||||
while (isAttacking)
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(AiStat.atkCooldown);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual bool CanAttack()
|
||||
{
|
||||
if (!TargetTransform || !IslandInfo.TargetAllList.Contains(TargetTransform)) return false;
|
||||
|
||||
var targetInAttackRange = Vector3.Distance(transform.position, TargetTransform.position) <=
|
||||
AiStat.atkRange;
|
||||
|
||||
if (targetInAttackRange)
|
||||
{
|
||||
SetAgentIsStopped(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
SetAgentIsStopped(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
private void FindMaterial()
|
||||
{
|
||||
var skinnedMeshRenderers = GetComponentsInChildren<SkinnedMeshRenderer>();
|
||||
@ -401,6 +535,40 @@ namespace BlueWaterProject
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveIslandInfo()
|
||||
{
|
||||
if (!IslandInfo) return;
|
||||
|
||||
IslandInfo.RemoveListElement(IslandInfo.EnemyList, transform);
|
||||
}
|
||||
|
||||
private void SetAttackerType()
|
||||
{
|
||||
if (gameObject.layer == LayerMask.NameToLayer("Player"))
|
||||
{
|
||||
attackerType = AttackerType.OFFENSE;
|
||||
}
|
||||
else if (gameObject.layer == LayerMask.NameToLayer("Pirate"))
|
||||
{
|
||||
attackerType = AttackerType.OFFENSE;
|
||||
}
|
||||
else if (gameObject.layer == LayerMask.NameToLayer("Enemy"))
|
||||
{
|
||||
attackerType = AttackerType.DEFENSE;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetAgentIsStopped(bool value)
|
||||
{
|
||||
if (navMeshAgent.enabled)
|
||||
{
|
||||
navMeshAgent.isStopped = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetAttackerType(AttackerType type) => attackerType = type;
|
||||
public void SetOffenseType(OffenseType type) => offenseType = type;
|
||||
public void SetDefenseType(DefenseType type) => defenseType = type;
|
||||
public void ResetHighlight() => SetOutlineColor(defaultSkinColor);
|
||||
public void MouseEnterHighlight() => SetOutlineColor(mouseEnterHighlightSkinColor);
|
||||
public void SelectedHighlight() => SetOutlineColor(selectedSkinColor);
|
||||
@ -408,7 +576,7 @@ namespace BlueWaterProject
|
||||
public void OnAttacking(int boolValue) => isAttacking = boolValue == 1;
|
||||
public NavMeshAgent GetNavMeshAgent() => navMeshAgent;
|
||||
public Animator GetAnimator() => aiAnimator;
|
||||
public void SetCurrentHp(float value) => AiStat.currentHp = value;
|
||||
public void SetMoveSpeed(float value) => navMeshAgent.speed = value;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
@ -29,16 +30,17 @@ namespace BlueWaterProject
|
||||
[Tooltip("공격 사거리")]
|
||||
public float atkRange;
|
||||
|
||||
[Tooltip("캐릭터의 방패 사용 유무")]
|
||||
public bool usingShield;
|
||||
|
||||
[Tooltip("방패 캐릭터를 공격했을 때, 방패 관통률")]
|
||||
[Range(0, 100)] public int shieldPenetrationRate;
|
||||
|
||||
[Tooltip("방패 캐릭터가 관통 당할 확률을 줄여주는 관통 저항률")]
|
||||
[Range(0, 100)] public int penetrationResistivity;
|
||||
|
||||
[Tooltip("공격을 피할 수 있는 회피율")]
|
||||
[Range(0, 100)] public int avoidanceRate;
|
||||
|
||||
[Tooltip("캐릭터의 방패 사용 유무")]
|
||||
public bool usingShield;
|
||||
|
||||
[ShowIf("@usingShield == true")]
|
||||
[Tooltip("방패 캐릭터가 관통 당할 확률을 줄여주는 관통 저항률")]
|
||||
[Range(0, 100)] public int penetrationResistivity;
|
||||
}
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Pool;
|
||||
@ -26,16 +27,31 @@ namespace BlueWaterProject
|
||||
[Range(0f, 2f)]
|
||||
[SerializeField] private float inaccuracy;
|
||||
|
||||
[SerializeField] private LayerMask archerLayer;
|
||||
|
||||
private IEnumerator shootArrowCoroutine;
|
||||
|
||||
private IObjectPool<Arrow> arrowPool;
|
||||
|
||||
[SerializeField] private Vector3 shootOffset = new(0f, 0.8f, 0);
|
||||
[SerializeField] private Vector3 rayOffset = new(0f, 0.7f, 0);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity Built-in Function
|
||||
|
||||
protected override void OnDrawGizmosSelected()
|
||||
{
|
||||
if (!IsDrawGizmosInFieldOfView) return;
|
||||
|
||||
if (!CanAttack()) return;
|
||||
|
||||
var myPos = transform.position;
|
||||
var targetPos = TargetTransform.position;
|
||||
var direction = ((targetPos + rayOffset) - (myPos + rayOffset)).normalized;
|
||||
|
||||
Debug.DrawRay(myPos + rayOffset, direction * AiStat.atkRange, Color.red);
|
||||
}
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
@ -50,23 +66,55 @@ namespace BlueWaterProject
|
||||
|
||||
#region Custom function
|
||||
|
||||
public override void UpdateLookAtTarget()
|
||||
{
|
||||
if (TargetTransform)
|
||||
{
|
||||
navMeshAgent.updateRotation = false;
|
||||
|
||||
var targetPos = TargetTransform.position;
|
||||
targetPos.y = transform.position.y;
|
||||
transform.LookAt(targetPos);
|
||||
}
|
||||
else
|
||||
{
|
||||
navMeshAgent.updateRotation = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Attack()
|
||||
{
|
||||
StartCoroutine(nameof(ShootArrowAnimation));
|
||||
}
|
||||
|
||||
protected override bool CanAttack()
|
||||
{
|
||||
if (!TargetTransform) return false;
|
||||
|
||||
var myPos = transform.position;
|
||||
var targetPos = TargetTransform.position;
|
||||
var direction = ((targetPos + rayOffset) - (myPos + rayOffset)).normalized;
|
||||
|
||||
var targetInAttackRange = Vector3.Distance(myPos, targetPos) <= AiStat.atkRange;
|
||||
var raycastHitTarget = Physics.Raycast(myPos + rayOffset, direction, out var hit, AiStat.atkRange, archerLayer, QueryTriggerInteraction.Collide);
|
||||
|
||||
return targetInAttackRange && raycastHitTarget;
|
||||
}
|
||||
|
||||
private IEnumerator ShootArrowAnimation()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
if (!TargetTransform)
|
||||
if (!CanAttack())
|
||||
{
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
isAttacking = false;
|
||||
yield return FindTargetWaitTime;
|
||||
continue;
|
||||
}
|
||||
|
||||
aiAnimator.SetTrigger(AttackHash);
|
||||
isAttacking = true;
|
||||
aiAnimator.SetTrigger(AttackHash);
|
||||
|
||||
while (isAttacking)
|
||||
{
|
||||
yield return null;
|
||||
@ -83,14 +131,29 @@ namespace BlueWaterProject
|
||||
{
|
||||
var arrow = arrowPool.Get();
|
||||
arrow.SetShootingArrow(shootLocation.position, transform.position,
|
||||
TargetTransform.position + shootOffset, AiStat, attackerType, inaccuracy);
|
||||
TargetTransform.position + rayOffset, AiStat, attackerType, inaccuracy);
|
||||
arrow.ShootArrowCoroutine();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Archer attack 애니메이션에 event 부착용 함수
|
||||
/// </summary>
|
||||
public void OnStoppedMove(int boolValue) => navMeshAgent.isStopped = boolValue == 1;
|
||||
public void OnStoppedMove(int boolValue)
|
||||
{
|
||||
switch (AttackMoveType)
|
||||
{
|
||||
case MoveType.NONE:
|
||||
break;
|
||||
case MoveType.FIXED:
|
||||
navMeshAgent.isStopped = true;
|
||||
break;
|
||||
case MoveType.MOVE:
|
||||
navMeshAgent.isStopped = boolValue == 1;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -1,11 +1,25 @@
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class Axeman : AiController
|
||||
{
|
||||
protected override void Attack()
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
weaponLocation = Utils.GetComponentAndAssert<Transform>(transform.
|
||||
Find("Bip001/Bip001 Pelvis/Bip001 Spine/Bip001 R Clavicle/Bip001 R UpperArm/Bip001 R Forearm/Bip001 R Hand/R_hand_container"));
|
||||
|
||||
foreach (Transform weapon in weaponLocation)
|
||||
{
|
||||
if (!weapon.gameObject.activeSelf) continue;
|
||||
|
||||
meleeWeapon = weapon.GetComponent<MeleeWeapon>();
|
||||
break;
|
||||
}
|
||||
meleeWeapon.SetAttackerType(attackerType);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +1,25 @@
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class SpearKnight : AiController
|
||||
{
|
||||
protected override void Attack()
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
weaponLocation = Utils.GetComponentAndAssert<Transform>(transform.
|
||||
Find("Bip001/Bip001 Pelvis/Bip001 Spine/Bip001 R Clavicle/Bip001 R UpperArm/Bip001 R Forearm/Bip001 R Hand/R_hand_container"));
|
||||
|
||||
foreach (Transform weapon in weaponLocation)
|
||||
{
|
||||
if (!weapon.gameObject.activeSelf) continue;
|
||||
|
||||
meleeWeapon = weapon.GetComponent<MeleeWeapon>();
|
||||
break;
|
||||
}
|
||||
meleeWeapon.SetAttackerType(attackerType);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +1,25 @@
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class Spearman : AiController
|
||||
{
|
||||
protected override void Attack()
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
weaponLocation = Utils.GetComponentAndAssert<Transform>(transform.
|
||||
Find("Bip001/Bip001 Pelvis/Bip001 Spine/Bip001 R Clavicle/Bip001 R UpperArm/Bip001 R Forearm/Bip001 R Hand/R_hand_container"));
|
||||
|
||||
foreach (Transform weapon in weaponLocation)
|
||||
{
|
||||
if (!weapon.gameObject.activeSelf) continue;
|
||||
|
||||
meleeWeapon = weapon.GetComponent<MeleeWeapon>();
|
||||
break;
|
||||
}
|
||||
meleeWeapon.SetAttackerType(attackerType);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +1,25 @@
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class SwordKnight : AiController
|
||||
{
|
||||
protected override void Attack()
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
weaponLocation = Utils.GetComponentAndAssert<Transform>(transform.
|
||||
Find("Bip001/Bip001 Pelvis/Bip001 Spine/Bip001 R Clavicle/Bip001 R UpperArm/Bip001 R Forearm/Bip001 R Hand/R_hand_container"));
|
||||
|
||||
foreach (Transform weapon in weaponLocation)
|
||||
{
|
||||
if (!weapon.gameObject.activeSelf) continue;
|
||||
|
||||
meleeWeapon = weapon.GetComponent<MeleeWeapon>();
|
||||
break;
|
||||
}
|
||||
meleeWeapon.SetAttackerType(attackerType);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +1,25 @@
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class Swordman : AiController
|
||||
{
|
||||
protected override void Attack()
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
weaponLocation = Utils.GetComponentAndAssert<Transform>(transform.
|
||||
Find("Bip001/Bip001 Pelvis/Bip001 Spine/Bip001 R Clavicle/Bip001 R UpperArm/Bip001 R Forearm/Bip001 R Hand/R_hand_container"));
|
||||
|
||||
foreach (Transform weapon in weaponLocation)
|
||||
{
|
||||
if (!weapon.gameObject.activeSelf) continue;
|
||||
|
||||
meleeWeapon = weapon.GetComponent<MeleeWeapon>();
|
||||
break;
|
||||
}
|
||||
meleeWeapon.SetAttackerType(attackerType);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
@ -41,8 +42,37 @@ namespace BlueWaterProject
|
||||
|
||||
public class UnitController : MonoBehaviour
|
||||
{
|
||||
#region Property and variable
|
||||
|
||||
[PropertyOrder(-11)]
|
||||
[EnableIf("@attackerType == AttackerType.OFFENSE")]
|
||||
[InlineButton("SetIslandInfoTest", "테스트 설정")]
|
||||
[SerializeField] private IslandInfo attackIslandInfo;
|
||||
|
||||
[PropertyOrder(-10)]
|
||||
public Unit unit;
|
||||
|
||||
private bool alwaysFalse;
|
||||
|
||||
[EnableIf("alwaysFalse")]
|
||||
[EnumToggleButtons]
|
||||
[OnValueChanged("OnTypeChanged")]
|
||||
[SerializeField] private AttackerType attackerType;
|
||||
|
||||
[ShowIf("attackerType", AttackerType.OFFENSE)]
|
||||
[OnValueChanged("OnTypeChanged")]
|
||||
[SerializeField] private OffenseType offenseType;
|
||||
|
||||
[ShowIf("attackerType", AttackerType.DEFENSE)]
|
||||
[OnValueChanged("OnTypeChanged")]
|
||||
[SerializeField] private DefenseType defenseType;
|
||||
|
||||
private bool isClickedTypeAllButton;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity built-in function
|
||||
|
||||
private void OnDrawGizmosSelected()
|
||||
{
|
||||
if (unit == null || unit.soliderCount <= 0) return;
|
||||
@ -56,8 +86,8 @@ namespace BlueWaterProject
|
||||
var row = i / matrix.columns;
|
||||
var column = i % matrix.columns;
|
||||
|
||||
var xOffset = (column - (matrix.columns - 1) / 2.0f) * 0.5f;
|
||||
var zOffset = (row - (matrix.rows - 1) / 2.0f) * 0.5f;
|
||||
var xOffset = (column - (matrix.columns - 1) / 2.0f) * unitManager.SoldierSpacing;
|
||||
var zOffset = (row - (matrix.rows - 1) / 2.0f) * unitManager.SoldierSpacing;
|
||||
var spawnPosition = transform.position + new Vector3(xOffset, 0, zOffset);
|
||||
|
||||
var ray = new Ray(spawnPosition, Vector3.down);
|
||||
@ -66,7 +96,19 @@ namespace BlueWaterProject
|
||||
}
|
||||
}
|
||||
|
||||
[ContextMenu("유닛 생성")]
|
||||
private void Awake()
|
||||
{
|
||||
SetIslandInfoTest();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Custom function
|
||||
|
||||
[PropertyOrder(-9)]
|
||||
[HorizontalGroup("Split", 0.5f)]
|
||||
[GUIColor("GetCreateUnitButtonColor")]
|
||||
[Button("유닛 생성")]
|
||||
public void CreateUnit()
|
||||
{
|
||||
if (!Application.isPlaying)
|
||||
@ -79,6 +121,65 @@ namespace BlueWaterProject
|
||||
UnitManager.Inst.CreateUnit(this);
|
||||
}
|
||||
|
||||
[PropertyOrder(-8)]
|
||||
[HorizontalGroup("Split", 0.5f)]
|
||||
[EnableIf("@unit.soliderCount > 0")]
|
||||
[GUIColor("GetAttackerTypeButtonColor")]
|
||||
[Button("공격 타입 자동 설정")]
|
||||
private void SetAttackerType()
|
||||
{
|
||||
if (unit.unitType.ToString().Contains("_E"))
|
||||
{
|
||||
attackerType = AttackerType.DEFENSE;
|
||||
foreach (var soldier in unit.soldierList)
|
||||
{
|
||||
soldier.SetAttackerType(attackerType);
|
||||
}
|
||||
}
|
||||
else if (unit.unitType.ToString().Contains("_P"))
|
||||
{
|
||||
attackerType = AttackerType.OFFENSE;
|
||||
foreach (var soldier in unit.soldierList)
|
||||
{
|
||||
soldier.SetAttackerType(attackerType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[PropertyOrder(-7)]
|
||||
[EnableIf("@unit.soliderCount > 0 && attackerType != AttackerType.NONE")]
|
||||
[GUIColor(1, 0, 0)]
|
||||
[Button("타입 초기화")]
|
||||
private void ResetTypeAll()
|
||||
{
|
||||
attackerType = AttackerType.NONE;
|
||||
offenseType = OffenseType.NONE;
|
||||
defenseType = DefenseType.NONE;
|
||||
|
||||
foreach (var soldier in unit.soldierList)
|
||||
{
|
||||
soldier.SetAttackerType(attackerType);
|
||||
soldier.SetOffenseType(offenseType);
|
||||
soldier.SetDefenseType(defenseType);
|
||||
}
|
||||
}
|
||||
|
||||
[PropertyOrder(1)]
|
||||
[GUIColor("GetTypeAllButtonColor")]
|
||||
[ShowIf("ShowTypeAllButton")]
|
||||
[Button("타입 모두 적용")]
|
||||
private void SetTypeAll()
|
||||
{
|
||||
foreach (var soldier in unit.soldierList)
|
||||
{
|
||||
soldier.SetAttackerType(attackerType);
|
||||
soldier.SetOffenseType(offenseType);
|
||||
soldier.SetDefenseType(defenseType);
|
||||
}
|
||||
|
||||
isClickedTypeAllButton = true;
|
||||
}
|
||||
|
||||
public void MoveCommand(Vector3 targetPos)
|
||||
{
|
||||
foreach (var soldier in unit.soldierList)
|
||||
@ -86,5 +187,57 @@ namespace BlueWaterProject
|
||||
soldier.MoveTarget(targetPos);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetIslandInfoTest()
|
||||
{
|
||||
if (attackerType != AttackerType.OFFENSE) return;
|
||||
|
||||
var islandInfo = FindObjectOfType<IslandInfo>();
|
||||
attackIslandInfo = islandInfo;
|
||||
|
||||
foreach (var soldier in unit.soldierList)
|
||||
{
|
||||
soldier.IslandInfo = attackIslandInfo;
|
||||
}
|
||||
}
|
||||
|
||||
private bool ShowTypeAllButton()
|
||||
{
|
||||
switch (attackerType)
|
||||
{
|
||||
case AttackerType.NONE:
|
||||
return false;
|
||||
case AttackerType.OFFENSE:
|
||||
if (offenseType == OffenseType.NONE)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case AttackerType.DEFENSE:
|
||||
if (defenseType == DefenseType.NONE)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
private Color GetCreateUnitButtonColor() => unit.soldierList.Count > 0 ? Color.white : Color.green;
|
||||
private Color GetAttackerTypeButtonColor()
|
||||
{
|
||||
if (unit.soldierList.Count > 0)
|
||||
{
|
||||
return attackerType == AttackerType.NONE ? Color.green : Color.white;
|
||||
}
|
||||
|
||||
return Color.white;
|
||||
}
|
||||
private Color GetTypeAllButtonColor() => isClickedTypeAllButton ? Color.white : Color.green;
|
||||
private void OnTypeChanged() => isClickedTypeAllButton = false;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -121,6 +121,7 @@ namespace BlueWaterProject
|
||||
|
||||
unitController.gameObject.layer = LayerMask.NameToLayer("Unit");
|
||||
unitController.unit.soldierList = new List<AiController>(unitController.unit.soliderCount);
|
||||
|
||||
var matrix = UnitMatrices.Find(um => um.soldiers == unitController.unit.soliderCount);
|
||||
if (matrix == null)
|
||||
{
|
||||
|
62
BlueWater/Assets/02.Scripts/HouseInfo.cs
Normal file
62
BlueWater/Assets/02.Scripts/HouseInfo.cs
Normal file
@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class HouseInfo : MonoBehaviour, IDamageable
|
||||
{
|
||||
#region Property and variable
|
||||
|
||||
public IslandInfo IslandInfo { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity built-in function
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
SetCurrentHp(AiStat.maxHp);
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
RemoveIslandInfo();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Interface property and function
|
||||
|
||||
[field: SerializeField] public AiStat AiStat { get; set; }
|
||||
|
||||
public float GetCurrentHp() => AiStat.currentHp;
|
||||
|
||||
public void SetCurrentHp(float value) => AiStat.currentHp = value;
|
||||
|
||||
public void TakeDamage(AiStat attacker, AiStat defender, Vector3? attackPos = null)
|
||||
{
|
||||
var changeHp = Mathf.Max(defender.currentHp - attacker.atk, 0);
|
||||
SetCurrentHp(changeHp);
|
||||
|
||||
// 건물 파괴
|
||||
if (changeHp == 0f)
|
||||
{
|
||||
RemoveIslandInfo();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Custom function
|
||||
|
||||
private void RemoveIslandInfo()
|
||||
{
|
||||
if (!IslandInfo) return;
|
||||
|
||||
IslandInfo.RemoveListElement(IslandInfo.HouseList, transform);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
11
BlueWater/Assets/02.Scripts/HouseInfo.cs.meta
Normal file
11
BlueWater/Assets/02.Scripts/HouseInfo.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 910f2fd54fe913648b37e911580e8068
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -5,5 +5,6 @@ namespace BlueWaterProject
|
||||
{
|
||||
public AiStat AiStat { get; set; }
|
||||
public float GetCurrentHp();
|
||||
public void SetCurrentHp(float value);
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,8 @@ namespace BlueWaterProject
|
||||
|
||||
IEnumerator FindTarget();
|
||||
|
||||
IEnumerator FindTargetInOffense();
|
||||
|
||||
void UpdateLookAtTarget();
|
||||
}
|
||||
}
|
103
BlueWater/Assets/02.Scripts/IslandInfo.cs
Normal file
103
BlueWater/Assets/02.Scripts/IslandInfo.cs
Normal file
@ -0,0 +1,103 @@
|
||||
using System.Collections.Generic;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class IslandInfo : MonoBehaviour
|
||||
{
|
||||
#region Property and variable
|
||||
|
||||
[field: SerializeField] public string IslandName { get; private set; }
|
||||
|
||||
[field: SerializeField] public List<Transform> HouseList { get; private set; }
|
||||
|
||||
[field: SerializeField] public List<UnitController> UnitList { get; private set; }
|
||||
|
||||
[field: SerializeField] public List<Transform> EnemyList { get; private set; }
|
||||
|
||||
[field: SerializeField] public List<Transform> TargetAllList { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity built-in Function
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
InitIslandInfo();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Custom function
|
||||
|
||||
[GUIColor(0, 1, 0)]
|
||||
[Button("섬 정보 추출")]
|
||||
private void InitIslandInfo()
|
||||
{
|
||||
HouseList = new List<Transform>(5);
|
||||
|
||||
var houses = transform.Find("Houses");
|
||||
foreach (Transform house in houses)
|
||||
{
|
||||
if (!house.CompareTag("House") || !house.gameObject.activeSelf) continue;
|
||||
|
||||
var houseInfo = house.GetComponent<HouseInfo>();
|
||||
houseInfo.IslandInfo = this;
|
||||
HouseList.Add(houseInfo.transform);
|
||||
}
|
||||
|
||||
UnitList = new List<UnitController>(20);
|
||||
|
||||
var units = transform.Find("Units");
|
||||
foreach (Transform unit in units)
|
||||
{
|
||||
if (!unit.CompareTag("Unit") || !unit.gameObject.activeSelf) continue;
|
||||
|
||||
UnitList.Add(unit.GetComponent<UnitController>());
|
||||
}
|
||||
|
||||
EnemyList = new List<Transform>(UnitList.Capacity * 16);
|
||||
|
||||
foreach (var unit in UnitList)
|
||||
{
|
||||
foreach (Transform enemy in unit.transform)
|
||||
{
|
||||
if (!unit.gameObject.activeSelf) continue;
|
||||
|
||||
var aiController = enemy.GetComponent<AiController>();
|
||||
aiController.IslandInfo = this;
|
||||
EnemyList.Add(aiController.transform);
|
||||
}
|
||||
}
|
||||
|
||||
TargetAllList = new List<Transform>(HouseList.Capacity + EnemyList.Capacity);
|
||||
|
||||
foreach (var enemy in EnemyList)
|
||||
{
|
||||
TargetAllList.Add(enemy);
|
||||
}
|
||||
|
||||
foreach (var house in HouseList)
|
||||
{
|
||||
TargetAllList.Add(house);
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveListElement(List<Transform> list, Transform element)
|
||||
{
|
||||
if (list.Contains(element))
|
||||
{
|
||||
list.Remove(element);
|
||||
}
|
||||
|
||||
if (TargetAllList.Contains(element))
|
||||
{
|
||||
TargetAllList.Remove(element);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
11
BlueWater/Assets/02.Scripts/IslandInfo.cs.meta
Normal file
11
BlueWater/Assets/02.Scripts/IslandInfo.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e21653ba0089cfe46beca2cdf851abcd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
BlueWater/Assets/02.Scripts/Weapon.meta
Normal file
8
BlueWater/Assets/02.Scripts/Weapon.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a7928c4d42519a64bbccf961139112b4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -12,12 +12,12 @@ namespace BlueWaterProject
|
||||
|
||||
[Tooltip("발사 이후 자동으로 사라지는데 까지 걸리는 시간")]
|
||||
[Range(0f, 10f)]
|
||||
[SerializeField] private float autoDestroyTime;
|
||||
[SerializeField] private float autoDestroyTime = 5f;
|
||||
|
||||
[Tooltip("화살이 날아가는 속도")]
|
||||
[SerializeField] private float arrowSpeed = 15f;
|
||||
[SerializeField] private float arrowSpeed = 10f;
|
||||
|
||||
[SerializeField] private bool isAttacked;
|
||||
private bool isAttacked;
|
||||
private float g = Mathf.Abs(Physics.gravity.y);
|
||||
private float inaccuracy;
|
||||
private Vector3? attackerPos;
|
||||
@ -59,24 +59,17 @@ namespace BlueWaterProject
|
||||
}
|
||||
else if (other.gameObject.layer == LayerMask.NameToLayer("HitBox"))
|
||||
{
|
||||
print(other.gameObject);
|
||||
switch (attackerType)
|
||||
{
|
||||
case AttackerType.NONE:
|
||||
break;
|
||||
case AttackerType.PLAYER:
|
||||
if (!other.gameObject.CompareTag("Enemy"))
|
||||
case AttackerType.OFFENSE:
|
||||
if (!other.gameObject.CompareTag("Enemy") && !other.gameObject.CompareTag("House"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case AttackerType.PIRATE:
|
||||
if (!other.gameObject.CompareTag("Enemy"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case AttackerType.ENEMY:
|
||||
case AttackerType.DEFENSE:
|
||||
if (!other.gameObject.CompareTag("Player") && !other.gameObject.CompareTag("Pirate"))
|
||||
{
|
||||
return;
|
64
BlueWater/Assets/02.Scripts/Weapon/MeleeWeapon.cs
Normal file
64
BlueWater/Assets/02.Scripts/Weapon/MeleeWeapon.cs
Normal file
@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class MeleeWeapon : MonoBehaviour
|
||||
{
|
||||
#region Property and variable
|
||||
|
||||
private bool isAttacked;
|
||||
|
||||
private AttackerType attackerType;
|
||||
private AiStat attackerStat;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity built-in function
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (isAttacked) return;
|
||||
|
||||
if (other.gameObject.layer == LayerMask.NameToLayer("HitBox"))
|
||||
{
|
||||
switch (attackerType)
|
||||
{
|
||||
case AttackerType.NONE:
|
||||
break;
|
||||
case AttackerType.OFFENSE:
|
||||
if (!other.gameObject.CompareTag("Enemy") && !other.gameObject.CompareTag("House"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case AttackerType.DEFENSE:
|
||||
if (!other.gameObject.CompareTag("Player") && !other.gameObject.CompareTag("Pirate"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
var iDamageable = other.GetComponentInParent<IDamageable>();
|
||||
|
||||
iDamageable.TakeDamage(attackerStat, iDamageable.AiStat);
|
||||
|
||||
isAttacked = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Custom function
|
||||
|
||||
public void SetIsAttacked(bool value) => isAttacked = value;
|
||||
public void SetAttackerType(AttackerType value) => attackerType = value;
|
||||
public void SetAttackerStat(AiStat value) => attackerStat = value;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
11
BlueWater/Assets/02.Scripts/Weapon/MeleeWeapon.cs.meta
Normal file
11
BlueWater/Assets/02.Scripts/Weapon/MeleeWeapon.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 963ba3bf2508749489c02769b0733cdd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -8958,14 +8958,14 @@ NavMeshAgent:
|
||||
m_GameObject: {fileID: 155132}
|
||||
m_Enabled: 1
|
||||
m_AgentTypeID: 0
|
||||
m_Radius: 0.5
|
||||
m_Radius: 0.4
|
||||
m_Speed: 3
|
||||
m_Acceleration: 8
|
||||
m_Acceleration: 20
|
||||
avoidancePriority: 50
|
||||
m_AngularSpeed: 180
|
||||
m_StoppingDistance: 1
|
||||
m_StoppingDistance: 0
|
||||
m_AutoTraverseOffMeshLink: 1
|
||||
m_AutoBraking: 1
|
||||
m_AutoBraking: 0
|
||||
m_AutoRepath: 1
|
||||
m_Height: 1.6
|
||||
m_BaseOffset: 0
|
||||
@ -8995,7 +8995,7 @@ Rigidbody:
|
||||
m_ImplicitTensor: 1
|
||||
m_UseGravity: 1
|
||||
m_IsKinematic: 1
|
||||
m_Interpolate: 1
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 80
|
||||
m_CollisionDetection: 2
|
||||
--- !u!136 &7791165217067826530
|
||||
@ -9017,7 +9017,7 @@ CapsuleCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.3
|
||||
m_Radius: 0.7
|
||||
m_Height: 1.6
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.8, z: 0}
|
||||
@ -9033,23 +9033,25 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: b934a5073db193343a89fc4597056b68, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
attackerType: 0
|
||||
offenseType: 0
|
||||
defenseType: 0
|
||||
skinMaterialList: []
|
||||
defaultSkinColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
mouseEnterHighlightSkinColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
selectedSkinColor: {r: 0, g: 0, b: 1, a: 1}
|
||||
isAttacking: 0
|
||||
<AiStat>k__BackingField:
|
||||
maxHp: 30
|
||||
currentHp: 0
|
||||
atk: 50
|
||||
def: 0
|
||||
moveSpd: 5
|
||||
moveSpd: 2.5
|
||||
atkCooldown: 3
|
||||
atkRange: 15
|
||||
usingShield: 0
|
||||
shieldPenetrationRate: 25
|
||||
penetrationResistivity: 0
|
||||
avoidanceRate: 20
|
||||
usingShield: 0
|
||||
penetrationResistivity: 0
|
||||
<IsDrawGizmosInFieldOfView>k__BackingField: 1
|
||||
<TargetLayer>k__BackingField:
|
||||
serializedVersion: 2
|
||||
@ -9087,6 +9089,7 @@ MonoBehaviour:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
<TargetTransform>k__BackingField: {fileID: 0}
|
||||
<MovePos>k__BackingField: {x: 0, y: 0, z: 0}
|
||||
<AttackMoveType>k__BackingField: 1
|
||||
<BeAttackedMoveType>k__BackingField: 1
|
||||
<IsCommanded>k__BackingField: 0
|
||||
@ -9096,7 +9099,10 @@ MonoBehaviour:
|
||||
shootLocation: {fileID: 461634}
|
||||
arrowsPoolLocation: {fileID: 0}
|
||||
inaccuracy: 0.5
|
||||
shootOffset: {x: 0, y: 0.8, z: 0}
|
||||
archerLayer:
|
||||
serializedVersion: 2
|
||||
m_Bits: 66328
|
||||
rayOffset: {x: 0, y: 0.7, z: 0}
|
||||
--- !u!1 &156456
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -19388,7 +19394,7 @@ CapsuleCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.3
|
||||
m_Radius: 0.7
|
||||
m_Height: 1.6
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.8, z: 0}
|
||||
|
@ -8958,14 +8958,14 @@ NavMeshAgent:
|
||||
m_GameObject: {fileID: 155132}
|
||||
m_Enabled: 1
|
||||
m_AgentTypeID: 0
|
||||
m_Radius: 0.5
|
||||
m_Radius: 0.4
|
||||
m_Speed: 3
|
||||
m_Acceleration: 8
|
||||
m_Acceleration: 20
|
||||
avoidancePriority: 50
|
||||
m_AngularSpeed: 180
|
||||
m_StoppingDistance: 1
|
||||
m_StoppingDistance: 0
|
||||
m_AutoTraverseOffMeshLink: 1
|
||||
m_AutoBraking: 1
|
||||
m_AutoBraking: 0
|
||||
m_AutoRepath: 1
|
||||
m_Height: 1.6
|
||||
m_BaseOffset: 0
|
||||
@ -8995,7 +8995,7 @@ Rigidbody:
|
||||
m_ImplicitTensor: 1
|
||||
m_UseGravity: 1
|
||||
m_IsKinematic: 1
|
||||
m_Interpolate: 1
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 80
|
||||
m_CollisionDetection: 2
|
||||
--- !u!136 &3683547817894632574
|
||||
@ -9017,7 +9017,7 @@ CapsuleCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.3
|
||||
m_Radius: 0.7
|
||||
m_Height: 1.6
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.8, z: 0}
|
||||
@ -9033,23 +9033,25 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 8aa9e82d64fb86549a75d2c51f97dd21, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
attackerType: 0
|
||||
offenseType: 0
|
||||
defenseType: 0
|
||||
skinMaterialList: []
|
||||
defaultSkinColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
mouseEnterHighlightSkinColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
selectedSkinColor: {r: 0, g: 0, b: 1, a: 1}
|
||||
isAttacking: 0
|
||||
<AiStat>k__BackingField:
|
||||
maxHp: 60
|
||||
currentHp: 0
|
||||
atk: 40
|
||||
def: 10
|
||||
moveSpd: 4.5
|
||||
moveSpd: 2
|
||||
atkCooldown: 2
|
||||
atkRange: 3
|
||||
usingShield: 1
|
||||
atkRange: 1.5
|
||||
shieldPenetrationRate: 75
|
||||
penetrationResistivity: 0
|
||||
avoidanceRate: 10
|
||||
usingShield: 1
|
||||
penetrationResistivity: 0
|
||||
<IsDrawGizmosInFieldOfView>k__BackingField: 1
|
||||
<TargetLayer>k__BackingField:
|
||||
serializedVersion: 2
|
||||
@ -9087,6 +9089,7 @@ MonoBehaviour:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
<TargetTransform>k__BackingField: {fileID: 0}
|
||||
<MovePos>k__BackingField: {x: 0, y: 0, z: 0}
|
||||
<AttackMoveType>k__BackingField: 2
|
||||
<BeAttackedMoveType>k__BackingField: 1
|
||||
<IsCommanded>k__BackingField: 0
|
||||
@ -15462,7 +15465,9 @@ GameObject:
|
||||
- component: {fileID: 417594}
|
||||
- component: {fileID: 3348354}
|
||||
- component: {fileID: 2369740}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 5166737479054603786}
|
||||
- component: {fileID: 7818685966306874328}
|
||||
m_Layer: 11
|
||||
m_Name: w_spear
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@ -15535,6 +15540,39 @@ MeshRenderer:
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!65 &5166737479054603786
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 188662}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 1
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 2.5193436, y: 0.10750065, z: 0.19868852}
|
||||
m_Center: {x: -0.4827807, y: 0.00000007848885, z: -0.00000020662533}
|
||||
--- !u!114 &7818685966306874328
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 188662}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 963ba3bf2508749489c02769b0733cdd, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &188790
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -19381,7 +19419,7 @@ CapsuleCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.3
|
||||
m_Radius: 0.7
|
||||
m_Height: 1.6
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.8, z: 0}
|
||||
|
@ -8958,14 +8958,14 @@ NavMeshAgent:
|
||||
m_GameObject: {fileID: 155132}
|
||||
m_Enabled: 1
|
||||
m_AgentTypeID: 0
|
||||
m_Radius: 0.5
|
||||
m_Radius: 0.4
|
||||
m_Speed: 3
|
||||
m_Acceleration: 8
|
||||
m_Acceleration: 20
|
||||
avoidancePriority: 50
|
||||
m_AngularSpeed: 180
|
||||
m_StoppingDistance: 1
|
||||
m_StoppingDistance: 0
|
||||
m_AutoTraverseOffMeshLink: 1
|
||||
m_AutoBraking: 1
|
||||
m_AutoBraking: 0
|
||||
m_AutoRepath: 1
|
||||
m_Height: 1.6
|
||||
m_BaseOffset: 0
|
||||
@ -8995,7 +8995,7 @@ Rigidbody:
|
||||
m_ImplicitTensor: 1
|
||||
m_UseGravity: 1
|
||||
m_IsKinematic: 1
|
||||
m_Interpolate: 1
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 80
|
||||
m_CollisionDetection: 2
|
||||
--- !u!136 &4122610663137176938
|
||||
@ -9017,7 +9017,7 @@ CapsuleCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.3
|
||||
m_Radius: 0.7
|
||||
m_Height: 1.6
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.8, z: 0}
|
||||
@ -9033,23 +9033,25 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: d17ac59ab4fe31846b058c6e1ca1cbb8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
attackerType: 0
|
||||
offenseType: 0
|
||||
defenseType: 0
|
||||
skinMaterialList: []
|
||||
defaultSkinColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
mouseEnterHighlightSkinColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
selectedSkinColor: {r: 0, g: 0, b: 1, a: 1}
|
||||
isAttacking: 0
|
||||
<AiStat>k__BackingField:
|
||||
maxHp: 40
|
||||
currentHp: 0
|
||||
atk: 50
|
||||
def: 5
|
||||
moveSpd: 5
|
||||
moveSpd: 3
|
||||
atkCooldown: 2
|
||||
atkRange: 3
|
||||
usingShield: 0
|
||||
atkRange: 1.5
|
||||
shieldPenetrationRate: 75
|
||||
penetrationResistivity: 0
|
||||
avoidanceRate: 20
|
||||
usingShield: 0
|
||||
penetrationResistivity: 0
|
||||
<IsDrawGizmosInFieldOfView>k__BackingField: 1
|
||||
<TargetLayer>k__BackingField:
|
||||
serializedVersion: 2
|
||||
@ -9087,6 +9089,7 @@ MonoBehaviour:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
<TargetTransform>k__BackingField: {fileID: 0}
|
||||
<MovePos>k__BackingField: {x: 0, y: 0, z: 0}
|
||||
<AttackMoveType>k__BackingField: 2
|
||||
<BeAttackedMoveType>k__BackingField: 2
|
||||
<IsCommanded>k__BackingField: 0
|
||||
@ -15462,7 +15465,9 @@ GameObject:
|
||||
- component: {fileID: 417594}
|
||||
- component: {fileID: 3348354}
|
||||
- component: {fileID: 2369740}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 8803970977398073786}
|
||||
- component: {fileID: 5508112752825231202}
|
||||
m_Layer: 11
|
||||
m_Name: w_spear
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@ -15535,6 +15540,39 @@ MeshRenderer:
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!65 &8803970977398073786
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 188662}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 1
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 2.5193436, y: 0.10750065, z: 0.19868852}
|
||||
m_Center: {x: -0.4827807, y: 0.00000007848885, z: -0.00000020662533}
|
||||
--- !u!114 &5508112752825231202
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 188662}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 963ba3bf2508749489c02769b0733cdd, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &188790
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -18849,7 +18887,7 @@ CapsuleCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.3
|
||||
m_Radius: 0.7
|
||||
m_Height: 1.6
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.8, z: 0}
|
||||
|
@ -8958,14 +8958,14 @@ NavMeshAgent:
|
||||
m_GameObject: {fileID: 155132}
|
||||
m_Enabled: 1
|
||||
m_AgentTypeID: 0
|
||||
m_Radius: 0.5
|
||||
m_Radius: 0.4
|
||||
m_Speed: 3
|
||||
m_Acceleration: 8
|
||||
m_Acceleration: 20
|
||||
avoidancePriority: 50
|
||||
m_AngularSpeed: 180
|
||||
m_StoppingDistance: 1
|
||||
m_StoppingDistance: 0
|
||||
m_AutoTraverseOffMeshLink: 1
|
||||
m_AutoBraking: 1
|
||||
m_AutoBraking: 0
|
||||
m_AutoRepath: 1
|
||||
m_Height: 1.6
|
||||
m_BaseOffset: 0
|
||||
@ -8995,7 +8995,7 @@ Rigidbody:
|
||||
m_ImplicitTensor: 1
|
||||
m_UseGravity: 1
|
||||
m_IsKinematic: 1
|
||||
m_Interpolate: 1
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 80
|
||||
m_CollisionDetection: 2
|
||||
--- !u!136 &1995768815968683845
|
||||
@ -9017,7 +9017,7 @@ CapsuleCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.3
|
||||
m_Radius: 0.7
|
||||
m_Height: 1.6
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.8, z: 0}
|
||||
@ -9033,23 +9033,25 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 4363b722ccf9a2b49b7506fd355c6a4d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
attackerType: 0
|
||||
offenseType: 0
|
||||
defenseType: 0
|
||||
skinMaterialList: []
|
||||
defaultSkinColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
mouseEnterHighlightSkinColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
selectedSkinColor: {r: 0, g: 0, b: 1, a: 1}
|
||||
isAttacking: 0
|
||||
<AiStat>k__BackingField:
|
||||
maxHp: 60
|
||||
currentHp: 0
|
||||
atk: 30
|
||||
def: 10
|
||||
moveSpd: 5.5
|
||||
moveSpd: 2.5
|
||||
atkCooldown: 1.5
|
||||
atkRange: 1.5
|
||||
usingShield: 1
|
||||
atkRange: 1
|
||||
shieldPenetrationRate: 50
|
||||
penetrationResistivity: 0
|
||||
avoidanceRate: 10
|
||||
usingShield: 1
|
||||
penetrationResistivity: 0
|
||||
<IsDrawGizmosInFieldOfView>k__BackingField: 1
|
||||
<TargetLayer>k__BackingField:
|
||||
serializedVersion: 2
|
||||
@ -9087,6 +9089,7 @@ MonoBehaviour:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
<TargetTransform>k__BackingField: {fileID: 0}
|
||||
<MovePos>k__BackingField: {x: 0, y: 0, z: 0}
|
||||
<AttackMoveType>k__BackingField: 2
|
||||
<BeAttackedMoveType>k__BackingField: 1
|
||||
<IsCommanded>k__BackingField: 0
|
||||
@ -14925,7 +14928,9 @@ GameObject:
|
||||
- component: {fileID: 450190}
|
||||
- component: {fileID: 3392154}
|
||||
- component: {fileID: 2315094}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 5565853171350640481}
|
||||
- component: {fileID: 7850778919014856986}
|
||||
m_Layer: 11
|
||||
m_Name: w_broad_sword
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@ -14998,6 +15003,39 @@ MeshRenderer:
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!65 &5565853171350640481
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 184136}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 1
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 1.385286, y: 0.09939674, z: 0.27483195}
|
||||
m_Center: {x: -0.3371152, y: -0.0027284573, z: -0.0038408174}
|
||||
--- !u!114 &7850778919014856986
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 184136}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 963ba3bf2508749489c02769b0733cdd, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &184766
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -18549,7 +18587,7 @@ CapsuleCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.3
|
||||
m_Radius: 0.7
|
||||
m_Height: 1.6
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.8, z: 0}
|
||||
|
@ -5448,7 +5448,9 @@ GameObject:
|
||||
- component: {fileID: 471802}
|
||||
- component: {fileID: 3349946}
|
||||
- component: {fileID: 2365236}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 4547973849060405524}
|
||||
- component: {fileID: 2340106073439679235}
|
||||
m_Layer: 11
|
||||
m_Name: w_sword
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@ -5521,6 +5523,39 @@ MeshRenderer:
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!65 &4547973849060405524
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 137884}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 1
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 1.4380312, y: 0.08983608, z: 0.3547706}
|
||||
m_Center: {x: -0.34669322, y: -0.0027284487, z: -0.0001850315}
|
||||
--- !u!114 &2340106073439679235
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 137884}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 963ba3bf2508749489c02769b0733cdd, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &138088
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -8958,14 +8993,14 @@ NavMeshAgent:
|
||||
m_GameObject: {fileID: 155132}
|
||||
m_Enabled: 1
|
||||
m_AgentTypeID: 0
|
||||
m_Radius: 0.5
|
||||
m_Radius: 0.4
|
||||
m_Speed: 3
|
||||
m_Acceleration: 8
|
||||
m_Acceleration: 20
|
||||
avoidancePriority: 50
|
||||
m_AngularSpeed: 180
|
||||
m_StoppingDistance: 1
|
||||
m_StoppingDistance: 0
|
||||
m_AutoTraverseOffMeshLink: 1
|
||||
m_AutoBraking: 1
|
||||
m_AutoBraking: 0
|
||||
m_AutoRepath: 1
|
||||
m_Height: 1.6
|
||||
m_BaseOffset: 0
|
||||
@ -8995,7 +9030,7 @@ Rigidbody:
|
||||
m_ImplicitTensor: 1
|
||||
m_UseGravity: 1
|
||||
m_IsKinematic: 1
|
||||
m_Interpolate: 1
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 80
|
||||
m_CollisionDetection: 2
|
||||
--- !u!136 &4374537182398505653
|
||||
@ -9017,7 +9052,7 @@ CapsuleCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.3
|
||||
m_Radius: 0.7
|
||||
m_Height: 1.6
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.8, z: 0}
|
||||
@ -9033,23 +9068,25 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: a7bb4d34880889448a03ef7d1b0ebee9, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
attackerType: 0
|
||||
offenseType: 0
|
||||
defenseType: 0
|
||||
skinMaterialList: []
|
||||
defaultSkinColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
mouseEnterHighlightSkinColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
selectedSkinColor: {r: 0, g: 0, b: 1, a: 1}
|
||||
isAttacking: 0
|
||||
<AiStat>k__BackingField:
|
||||
maxHp: 45
|
||||
currentHp: 0
|
||||
atk: 35
|
||||
def: 5
|
||||
moveSpd: 6
|
||||
moveSpd: 3.5
|
||||
atkCooldown: 1.5
|
||||
atkRange: 1.5
|
||||
usingShield: 0
|
||||
atkRange: 1
|
||||
shieldPenetrationRate: 50
|
||||
penetrationResistivity: 0
|
||||
avoidanceRate: 30
|
||||
usingShield: 0
|
||||
penetrationResistivity: 0
|
||||
<IsDrawGizmosInFieldOfView>k__BackingField: 1
|
||||
<TargetLayer>k__BackingField:
|
||||
serializedVersion: 2
|
||||
@ -9087,6 +9124,7 @@ MonoBehaviour:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
<TargetTransform>k__BackingField: {fileID: 0}
|
||||
<MovePos>k__BackingField: {x: 0, y: 0, z: 0}
|
||||
<AttackMoveType>k__BackingField: 2
|
||||
<BeAttackedMoveType>k__BackingField: 2
|
||||
<IsCommanded>k__BackingField: 0
|
||||
@ -18549,7 +18587,7 @@ CapsuleCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.3
|
||||
m_Radius: 0.7
|
||||
m_Height: 1.6
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.8, z: 0}
|
||||
|
@ -8958,14 +8958,14 @@ NavMeshAgent:
|
||||
m_GameObject: {fileID: 155132}
|
||||
m_Enabled: 1
|
||||
m_AgentTypeID: 0
|
||||
m_Radius: 0.5
|
||||
m_Radius: 0.4
|
||||
m_Speed: 3
|
||||
m_Acceleration: 8
|
||||
m_Acceleration: 20
|
||||
avoidancePriority: 50
|
||||
m_AngularSpeed: 180
|
||||
m_StoppingDistance: 1
|
||||
m_StoppingDistance: 0
|
||||
m_AutoTraverseOffMeshLink: 1
|
||||
m_AutoBraking: 1
|
||||
m_AutoBraking: 0
|
||||
m_AutoRepath: 1
|
||||
m_Height: 1.6
|
||||
m_BaseOffset: 0
|
||||
@ -8995,7 +8995,7 @@ Rigidbody:
|
||||
m_ImplicitTensor: 1
|
||||
m_UseGravity: 1
|
||||
m_IsKinematic: 1
|
||||
m_Interpolate: 1
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 80
|
||||
m_CollisionDetection: 2
|
||||
--- !u!136 &1485348745952943168
|
||||
@ -9017,7 +9017,7 @@ CapsuleCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.3
|
||||
m_Radius: 0.7
|
||||
m_Height: 1.6
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.8, z: 0}
|
||||
@ -9033,23 +9033,25 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: b934a5073db193343a89fc4597056b68, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
attackerType: 0
|
||||
offenseType: 0
|
||||
defenseType: 0
|
||||
skinMaterialList: []
|
||||
defaultSkinColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
mouseEnterHighlightSkinColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
selectedSkinColor: {r: 0, g: 0, b: 1, a: 1}
|
||||
isAttacking: 0
|
||||
<AiStat>k__BackingField:
|
||||
maxHp: 30
|
||||
currentHp: 0
|
||||
atk: 50
|
||||
def: 0
|
||||
moveSpd: 5
|
||||
moveSpd: 2.5
|
||||
atkCooldown: 3
|
||||
atkRange: 15
|
||||
usingShield: 0
|
||||
shieldPenetrationRate: 25
|
||||
penetrationResistivity: 0
|
||||
avoidanceRate: 20
|
||||
usingShield: 0
|
||||
penetrationResistivity: 0
|
||||
<IsDrawGizmosInFieldOfView>k__BackingField: 1
|
||||
<TargetLayer>k__BackingField:
|
||||
serializedVersion: 2
|
||||
@ -9087,6 +9089,7 @@ MonoBehaviour:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
<TargetTransform>k__BackingField: {fileID: 0}
|
||||
<MovePos>k__BackingField: {x: 0, y: 0, z: 0}
|
||||
<AttackMoveType>k__BackingField: 1
|
||||
<BeAttackedMoveType>k__BackingField: 1
|
||||
<IsCommanded>k__BackingField: 0
|
||||
@ -9096,7 +9099,10 @@ MonoBehaviour:
|
||||
shootLocation: {fileID: 449662}
|
||||
arrowsPoolLocation: {fileID: 0}
|
||||
inaccuracy: 0.5
|
||||
shootOffset: {x: 0, y: 0.8, z: 0}
|
||||
archerLayer:
|
||||
serializedVersion: 2
|
||||
m_Bits: 66584
|
||||
rayOffset: {x: 0, y: 0.7, z: 0}
|
||||
--- !u!1 &156456
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -19388,7 +19394,7 @@ CapsuleCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.3
|
||||
m_Radius: 0.7
|
||||
m_Height: 1.6
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.8, z: 0}
|
||||
|
@ -8958,14 +8958,14 @@ NavMeshAgent:
|
||||
m_GameObject: {fileID: 155132}
|
||||
m_Enabled: 1
|
||||
m_AgentTypeID: 0
|
||||
m_Radius: 0.5
|
||||
m_Radius: 0.4
|
||||
m_Speed: 3
|
||||
m_Acceleration: 8
|
||||
m_Acceleration: 20
|
||||
avoidancePriority: 50
|
||||
m_AngularSpeed: 180
|
||||
m_StoppingDistance: 1
|
||||
m_StoppingDistance: 0
|
||||
m_AutoTraverseOffMeshLink: 1
|
||||
m_AutoBraking: 1
|
||||
m_AutoBraking: 0
|
||||
m_AutoRepath: 1
|
||||
m_Height: 1.6
|
||||
m_BaseOffset: 0
|
||||
@ -8995,7 +8995,7 @@ Rigidbody:
|
||||
m_ImplicitTensor: 1
|
||||
m_UseGravity: 1
|
||||
m_IsKinematic: 1
|
||||
m_Interpolate: 1
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 80
|
||||
m_CollisionDetection: 2
|
||||
--- !u!136 &2219967035923003510
|
||||
@ -9017,7 +9017,7 @@ CapsuleCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.3
|
||||
m_Radius: 0.7
|
||||
m_Height: 1.6
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.8, z: 0}
|
||||
@ -9033,23 +9033,25 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 62993cbcb58ab6845897f946bdcb90c6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
attackerType: 1
|
||||
offenseType: 1
|
||||
defenseType: 0
|
||||
skinMaterialList: []
|
||||
defaultSkinColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
mouseEnterHighlightSkinColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
selectedSkinColor: {r: 0, g: 0, b: 1, a: 1}
|
||||
isAttacking: 0
|
||||
<AiStat>k__BackingField:
|
||||
maxHp: 50
|
||||
currentHp: 0
|
||||
atk: 50
|
||||
def: 0
|
||||
moveSpd: 4.5
|
||||
moveSpd: 2.5
|
||||
atkCooldown: 2.5
|
||||
atkRange: 3
|
||||
usingShield: 0
|
||||
atkRange: 1.5
|
||||
shieldPenetrationRate: 100
|
||||
penetrationResistivity: 0
|
||||
avoidanceRate: 10
|
||||
usingShield: 0
|
||||
penetrationResistivity: 0
|
||||
<IsDrawGizmosInFieldOfView>k__BackingField: 1
|
||||
<TargetLayer>k__BackingField:
|
||||
serializedVersion: 2
|
||||
@ -9087,6 +9089,7 @@ MonoBehaviour:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
<TargetTransform>k__BackingField: {fileID: 0}
|
||||
<MovePos>k__BackingField: {x: 0, y: 0, z: 0}
|
||||
<AttackMoveType>k__BackingField: 2
|
||||
<BeAttackedMoveType>k__BackingField: 2
|
||||
<IsCommanded>k__BackingField: 0
|
||||
@ -15126,7 +15129,9 @@ GameObject:
|
||||
- component: {fileID: 469364}
|
||||
- component: {fileID: 3308848}
|
||||
- component: {fileID: 2363452}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 6730934867836102213}
|
||||
- component: {fileID: 6039807340738501520}
|
||||
m_Layer: 11
|
||||
m_Name: w_TH_Axe_B
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@ -15199,6 +15204,39 @@ MeshRenderer:
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!65 &6730934867836102213
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 186154}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 1
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 1.8084028, y: 0.15842319, z: 0.7862298}
|
||||
m_Center: {x: -0.25574672, y: -0.00000052033107, z: 0.000000299843}
|
||||
--- !u!114 &6039807340738501520
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 186154}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 963ba3bf2508749489c02769b0733cdd, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &186232
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -18549,7 +18587,7 @@ CapsuleCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.3
|
||||
m_Radius: 0.7
|
||||
m_Height: 1.6
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.8, z: 0}
|
||||
|
@ -8958,14 +8958,14 @@ NavMeshAgent:
|
||||
m_GameObject: {fileID: 155132}
|
||||
m_Enabled: 1
|
||||
m_AgentTypeID: 0
|
||||
m_Radius: 0.5
|
||||
m_Radius: 0.4
|
||||
m_Speed: 3
|
||||
m_Acceleration: 8
|
||||
m_Acceleration: 20
|
||||
avoidancePriority: 50
|
||||
m_AngularSpeed: 180
|
||||
m_StoppingDistance: 1
|
||||
m_StoppingDistance: 0
|
||||
m_AutoTraverseOffMeshLink: 1
|
||||
m_AutoBraking: 1
|
||||
m_AutoBraking: 0
|
||||
m_AutoRepath: 1
|
||||
m_Height: 1.6
|
||||
m_BaseOffset: 0
|
||||
@ -8995,7 +8995,7 @@ Rigidbody:
|
||||
m_ImplicitTensor: 1
|
||||
m_UseGravity: 1
|
||||
m_IsKinematic: 1
|
||||
m_Interpolate: 1
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 80
|
||||
m_CollisionDetection: 2
|
||||
--- !u!136 &13124744015303705
|
||||
@ -9017,7 +9017,7 @@ CapsuleCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.3
|
||||
m_Radius: 0.7
|
||||
m_Height: 1.6
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.8, z: 0}
|
||||
@ -9033,23 +9033,25 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: d17ac59ab4fe31846b058c6e1ca1cbb8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
attackerType: 0
|
||||
offenseType: 0
|
||||
defenseType: 0
|
||||
skinMaterialList: []
|
||||
defaultSkinColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
mouseEnterHighlightSkinColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
selectedSkinColor: {r: 0, g: 0, b: 1, a: 1}
|
||||
isAttacking: 0
|
||||
<AiStat>k__BackingField:
|
||||
maxHp: 40
|
||||
currentHp: 0
|
||||
atk: 50
|
||||
def: 5
|
||||
moveSpd: 5
|
||||
moveSpd: 3
|
||||
atkCooldown: 2
|
||||
atkRange: 3
|
||||
usingShield: 0
|
||||
atkRange: 1.5
|
||||
shieldPenetrationRate: 75
|
||||
penetrationResistivity: 0
|
||||
avoidanceRate: 20
|
||||
usingShield: 0
|
||||
penetrationResistivity: 0
|
||||
<IsDrawGizmosInFieldOfView>k__BackingField: 1
|
||||
<TargetLayer>k__BackingField:
|
||||
serializedVersion: 2
|
||||
@ -9087,6 +9089,7 @@ MonoBehaviour:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
<TargetTransform>k__BackingField: {fileID: 0}
|
||||
<MovePos>k__BackingField: {x: 0, y: 0, z: 0}
|
||||
<AttackMoveType>k__BackingField: 2
|
||||
<BeAttackedMoveType>k__BackingField: 2
|
||||
<IsCommanded>k__BackingField: 0
|
||||
@ -15462,7 +15465,9 @@ GameObject:
|
||||
- component: {fileID: 417594}
|
||||
- component: {fileID: 3348354}
|
||||
- component: {fileID: 2369740}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 6546714404053561780}
|
||||
- component: {fileID: 3011152420889491673}
|
||||
m_Layer: 11
|
||||
m_Name: w_spear
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@ -15535,6 +15540,39 @@ MeshRenderer:
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!65 &6546714404053561780
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 188662}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 1
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 2.5193436, y: 0.10750065, z: 0.19868852}
|
||||
m_Center: {x: -0.4827807, y: 0.00000007848885, z: -0.00000020662533}
|
||||
--- !u!114 &3011152420889491673
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 188662}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 963ba3bf2508749489c02769b0733cdd, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &188790
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -17918,7 +17956,7 @@ CapsuleCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.3
|
||||
m_Radius: 0.7
|
||||
m_Height: 1.6
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.8, z: 0}
|
||||
|
@ -8958,14 +8958,14 @@ NavMeshAgent:
|
||||
m_GameObject: {fileID: 155132}
|
||||
m_Enabled: 1
|
||||
m_AgentTypeID: 0
|
||||
m_Radius: 0.5
|
||||
m_Radius: 0.4
|
||||
m_Speed: 3
|
||||
m_Acceleration: 8
|
||||
m_Acceleration: 20
|
||||
avoidancePriority: 50
|
||||
m_AngularSpeed: 180
|
||||
m_StoppingDistance: 1
|
||||
m_StoppingDistance: 0
|
||||
m_AutoTraverseOffMeshLink: 1
|
||||
m_AutoBraking: 1
|
||||
m_AutoBraking: 0
|
||||
m_AutoRepath: 1
|
||||
m_Height: 1.6
|
||||
m_BaseOffset: 0
|
||||
@ -8995,7 +8995,7 @@ Rigidbody:
|
||||
m_ImplicitTensor: 1
|
||||
m_UseGravity: 1
|
||||
m_IsKinematic: 1
|
||||
m_Interpolate: 1
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 80
|
||||
m_CollisionDetection: 2
|
||||
--- !u!136 &9121247047284190495
|
||||
@ -9017,7 +9017,7 @@ CapsuleCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.3
|
||||
m_Radius: 0.7
|
||||
m_Height: 1.6
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.8, z: 0}
|
||||
@ -9033,23 +9033,25 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 4363b722ccf9a2b49b7506fd355c6a4d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
attackerType: 0
|
||||
offenseType: 0
|
||||
defenseType: 0
|
||||
skinMaterialList: []
|
||||
defaultSkinColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
mouseEnterHighlightSkinColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
selectedSkinColor: {r: 0, g: 0, b: 1, a: 1}
|
||||
isAttacking: 0
|
||||
<AiStat>k__BackingField:
|
||||
maxHp: 60
|
||||
currentHp: 0
|
||||
atk: 30
|
||||
def: 10
|
||||
moveSpd: 5.5
|
||||
moveSpd: 2.5
|
||||
atkCooldown: 1.5
|
||||
atkRange: 1.5
|
||||
usingShield: 1
|
||||
atkRange: 1
|
||||
shieldPenetrationRate: 50
|
||||
penetrationResistivity: 0
|
||||
avoidanceRate: 10
|
||||
usingShield: 1
|
||||
penetrationResistivity: 0
|
||||
<IsDrawGizmosInFieldOfView>k__BackingField: 1
|
||||
<TargetLayer>k__BackingField:
|
||||
serializedVersion: 2
|
||||
@ -9087,6 +9089,7 @@ MonoBehaviour:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
<TargetTransform>k__BackingField: {fileID: 0}
|
||||
<MovePos>k__BackingField: {x: 0, y: 0, z: 0}
|
||||
<AttackMoveType>k__BackingField: 2
|
||||
<BeAttackedMoveType>k__BackingField: 2
|
||||
<IsCommanded>k__BackingField: 0
|
||||
@ -16029,7 +16032,9 @@ GameObject:
|
||||
- component: {fileID: 499568}
|
||||
- component: {fileID: 3337466}
|
||||
- component: {fileID: 2360202}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 6367808533911755737}
|
||||
- component: {fileID: 6608311748338932414}
|
||||
m_Layer: 11
|
||||
m_Name: w_sabre
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@ -16101,6 +16106,39 @@ MeshRenderer:
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!65 &6367808533911755737
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 191174}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 1
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 1.2448307, y: 0.11558086, z: 0.25710955}
|
||||
m_Center: {x: -0.35317457, y: 0.0004987254, z: 0.039650697}
|
||||
--- !u!114 &6608311748338932414
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 191174}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 963ba3bf2508749489c02769b0733cdd, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &191534
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -18849,7 +18887,7 @@ CapsuleCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.3
|
||||
m_Radius: 0.7
|
||||
m_Height: 1.6
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.8, z: 0}
|
||||
|
@ -8958,14 +8958,14 @@ NavMeshAgent:
|
||||
m_GameObject: {fileID: 155132}
|
||||
m_Enabled: 1
|
||||
m_AgentTypeID: 0
|
||||
m_Radius: 0.5
|
||||
m_Radius: 0.4
|
||||
m_Speed: 3
|
||||
m_Acceleration: 8
|
||||
m_Acceleration: 20
|
||||
avoidancePriority: 50
|
||||
m_AngularSpeed: 180
|
||||
m_StoppingDistance: 1
|
||||
m_StoppingDistance: 0
|
||||
m_AutoTraverseOffMeshLink: 1
|
||||
m_AutoBraking: 1
|
||||
m_AutoBraking: 0
|
||||
m_AutoRepath: 1
|
||||
m_Height: 1.6
|
||||
m_BaseOffset: 0
|
||||
@ -8995,7 +8995,7 @@ Rigidbody:
|
||||
m_ImplicitTensor: 1
|
||||
m_UseGravity: 1
|
||||
m_IsKinematic: 1
|
||||
m_Interpolate: 1
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 80
|
||||
m_CollisionDetection: 2
|
||||
--- !u!136 &6882424985411624636
|
||||
@ -9017,7 +9017,7 @@ CapsuleCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.3
|
||||
m_Radius: 0.7
|
||||
m_Height: 1.6
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.8, z: 0}
|
||||
@ -9033,23 +9033,25 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: a7bb4d34880889448a03ef7d1b0ebee9, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
attackerType: 0
|
||||
offenseType: 0
|
||||
defenseType: 0
|
||||
skinMaterialList: []
|
||||
defaultSkinColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
mouseEnterHighlightSkinColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
selectedSkinColor: {r: 0, g: 0, b: 1, a: 1}
|
||||
isAttacking: 0
|
||||
<AiStat>k__BackingField:
|
||||
maxHp: 45
|
||||
currentHp: 0
|
||||
atk: 35
|
||||
def: 5
|
||||
moveSpd: 6
|
||||
moveSpd: 3.5
|
||||
atkCooldown: 1.5
|
||||
atkRange: 1.5
|
||||
usingShield: 0
|
||||
atkRange: 1
|
||||
shieldPenetrationRate: 50
|
||||
penetrationResistivity: 0
|
||||
avoidanceRate: 30
|
||||
usingShield: 0
|
||||
penetrationResistivity: 0
|
||||
<IsDrawGizmosInFieldOfView>k__BackingField: 1
|
||||
<TargetLayer>k__BackingField:
|
||||
serializedVersion: 2
|
||||
@ -9087,6 +9089,7 @@ MonoBehaviour:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
<TargetTransform>k__BackingField: {fileID: 0}
|
||||
<MovePos>k__BackingField: {x: 0, y: 0, z: 0}
|
||||
<AttackMoveType>k__BackingField: 2
|
||||
<BeAttackedMoveType>k__BackingField: 2
|
||||
<IsCommanded>k__BackingField: 0
|
||||
@ -12833,7 +12836,9 @@ GameObject:
|
||||
- component: {fileID: 471752}
|
||||
- component: {fileID: 3350230}
|
||||
- component: {fileID: 2365674}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 7805113162568331569}
|
||||
- component: {fileID: 7789176050104732763}
|
||||
m_Layer: 11
|
||||
m_Name: w_dagger_B
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@ -12906,6 +12911,39 @@ MeshRenderer:
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!65 &7805113162568331569
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 172330}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 1
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 1.0579902, y: 0.08983595, z: 0.25992557}
|
||||
m_Center: {x: -0.15847746, y: -0.002728463, z: 0.0000011445804}
|
||||
--- !u!114 &7789176050104732763
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 172330}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 963ba3bf2508749489c02769b0733cdd, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &172452
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -18749,7 +18787,7 @@ CapsuleCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.3
|
||||
m_Radius: 0.7
|
||||
m_Height: 1.6
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.8, z: 0}
|
||||
|
@ -12,7 +12,7 @@ GameObject:
|
||||
- component: {fileID: 8302608207570708049}
|
||||
m_Layer: 6
|
||||
m_Name: Unit
|
||||
m_TagString: Untagged
|
||||
m_TagString: Unit
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
|
@ -36545,7 +36545,7 @@ AnimationClip:
|
||||
intParameter: 1
|
||||
messageOptions: 0
|
||||
- time: 1.5
|
||||
functionName:
|
||||
functionName: OnAttacking
|
||||
data:
|
||||
objectReferenceParameter: {fileID: 0}
|
||||
floatParameter: 0
|
||||
|
@ -18,7 +18,7 @@ PhysicsManager:
|
||||
m_ClothInterCollisionDistance: 0.1
|
||||
m_ClothInterCollisionStiffness: 0.2
|
||||
m_ContactsGeneration: 1
|
||||
m_LayerCollisionMatrix: 100000001000000010000000381f00001f080000080000000000000000010000880700000807000008070000181000000808000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
m_LayerCollisionMatrix: 100000001000000010000000381f00001f080000080000000000000000010000880700000807000008070000181001000808000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
m_SimulationMode: 0
|
||||
m_AutoSyncTransforms: 0
|
||||
m_ReuseCollisionCallbacks: 0
|
||||
|
@ -9,6 +9,8 @@ TagManager:
|
||||
- Stair
|
||||
- Enemy
|
||||
- Pirate
|
||||
- House
|
||||
- Unit
|
||||
layers:
|
||||
- Default
|
||||
- TransparentFX
|
||||
@ -26,7 +28,7 @@ TagManager:
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Props
|
||||
-
|
||||
-
|
||||
-
|
||||
|
Loading…
Reference in New Issue
Block a user