+ 해적선 Ai 추가 ㄴ 패트롤, 추격, 공격 등의 패턴 적용 + Cannon 클래스 분리 ㄴ 캐논 자체의 기능만 남기고, Player는 CannonController와 연결해서 사용 + Player, Pirate 용 cannon projectile 분리 + New input system 네이밍 변경 ㄴ ToggleCannon -> ToggleLaunchMode ㄴ FireCannon -> LaunchCannon + 해적선 Ai에 Rayfire(파괴) 기능 테스트용 추가
This commit is contained in:
parent
35440098e4
commit
86f9d2607e
File diff suppressed because one or more lines are too long
@ -17,7 +17,7 @@ namespace BlueWaterProject
|
||||
|
||||
public override void OnStart()
|
||||
{
|
||||
currentWaitTime = iPatrol.GetCurrentWayPoint().WaitTime;
|
||||
currentWaitTime = iPatrol.GetCurrentWayPointInfo().WaitTime;
|
||||
|
||||
time = 0f;
|
||||
}
|
||||
|
@ -1,25 +1,20 @@
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AI;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class ShipPatrol : MonoBehaviour, IPatrol
|
||||
public class Patrol : MonoBehaviour
|
||||
{
|
||||
/***********************************************************************
|
||||
* Variables
|
||||
***********************************************************************/
|
||||
#region Variables
|
||||
|
||||
// 컴포넌트
|
||||
[Title("컴포넌트")]
|
||||
[SerializeField] private Rigidbody rb;
|
||||
|
||||
// 패트롤 옵션
|
||||
[Title("패트롤 옵션")]
|
||||
[SerializeField] private bool showWayPointGizmo = true;
|
||||
[field: SerializeField] public WayPoint[] WayPoints { get; set; }
|
||||
[field: SerializeField] public WayPointInfo[] WayPoints { get; set; }
|
||||
[field: SerializeField] public Vector3 OriginalPoint { get; set; }
|
||||
[field: SerializeField] public int CurrentIndex { get; set; }
|
||||
[field: SerializeField] public int PreviousIndex { get; set; }
|
||||
@ -43,7 +38,7 @@ namespace BlueWaterProject
|
||||
|
||||
if (!Application.isPlaying)
|
||||
{
|
||||
OriginalPoint = rb.position;
|
||||
OriginalPoint = transform.position;
|
||||
}
|
||||
|
||||
for (var i = 0; i < WayPoints.Length; i++)
|
||||
@ -87,7 +82,8 @@ namespace BlueWaterProject
|
||||
***********************************************************************/
|
||||
#region Methods
|
||||
|
||||
public WayPoint GetCurrentWayPoint() => WayPoints[CurrentIndex];
|
||||
public WayPointInfo GetCurrentWayPointInfo() => WayPoints[CurrentIndex];
|
||||
public Vector3 GetCurrentWayPoint() => OriginalPoint + WayPoints[CurrentIndex].Point;
|
||||
|
||||
public int GetNextIndex()
|
||||
{
|
||||
@ -106,65 +102,23 @@ namespace BlueWaterProject
|
||||
|
||||
public bool HasReachedDestination()
|
||||
{
|
||||
var myPosition = rb.position;
|
||||
var myPosition = transform.position;
|
||||
var movePoint = OriginalPoint + WayPoints[CurrentIndex].Point;
|
||||
var distance = Vector3.Distance(myPosition, movePoint);
|
||||
|
||||
print(distance);
|
||||
|
||||
if (distance > 3f) return false;
|
||||
|
||||
print("도착");
|
||||
return true;
|
||||
}
|
||||
|
||||
public void SetMovePoint()
|
||||
{
|
||||
if (!rb || WayPoints == null || WayPoints.Length <= CurrentIndex) return;
|
||||
if (WayPoints == null || WayPoints.Length <= CurrentIndex) return;
|
||||
|
||||
print("다음 목적지");
|
||||
PreviousIndex = CurrentIndex;
|
||||
CurrentIndex = GetNextIndex();
|
||||
}
|
||||
|
||||
public void UpdatePositionAndRotation()
|
||||
{
|
||||
// // 현재 위치에서 목표지점까지의 방향과 거리 계산
|
||||
// var myPosition = rb.position;
|
||||
// var movePoint = OriginalPoint + WayPoints[CurrentIndex].Point;
|
||||
// var direction = (movePoint - myPosition).normalized;
|
||||
// var distance = Vector3.Distance(movePoint, myPosition);
|
||||
//
|
||||
// // Combine forces with weights
|
||||
// var currentVelocity = seekForce + avoidForce;
|
||||
// currentVelocity = Vector3.ClampMagnitude(currentVelocity, maxVelocity);
|
||||
//
|
||||
// if (distance < 10f)
|
||||
// {
|
||||
// // 목적지에 가까워짐에 따라 속도를 동적으로 조절
|
||||
// var desiredSpeed = (distance / 10f) * maxSpeed;
|
||||
// currentVelocity = currentVelocity.normalized * desiredSpeed;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // 목적지에서 멀리 떨어져 있을 때는 최대 속도로 이동
|
||||
// currentVelocity = Vector3.ClampMagnitude(currentVelocity, maxSpeed);
|
||||
// }
|
||||
//
|
||||
// rb.AddForce(currentVelocity - rb.velocity, ForceMode.Acceleration);
|
||||
//
|
||||
// //rb.AddForce(currentVelocity, ForceMode.Acceleration);
|
||||
//
|
||||
// if (rb.velocity.magnitude > 10f)
|
||||
// {
|
||||
// rb.velocity = rb.velocity.normalized * 10f;
|
||||
// }
|
||||
//
|
||||
// var targetRotation = Quaternion.LookRotation(direction);
|
||||
// rb.MoveRotation(Quaternion.RotateTowards(rb.rotation, targetRotation, rotationSpeed * Time.deltaTime));
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,17 +1,91 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using BehaviorDesigner.Runtime;
|
||||
using Pathfinding;
|
||||
using RayFire;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class PirateShipAi : MonoBehaviour
|
||||
public class PirateShipAi : MonoBehaviour, IDamageable
|
||||
{
|
||||
/***********************************************************************
|
||||
* Variables
|
||||
***********************************************************************/
|
||||
#region Variables
|
||||
|
||||
// Components
|
||||
[SerializeField] private ShipPatrol shipPatrol;
|
||||
// 컴포넌트
|
||||
[TitleGroup("컴포넌트"), BoxGroup("컴포넌트/컴포넌트", ShowLabel = false)]
|
||||
[Required, SerializeField] private Patrol patrol;
|
||||
|
||||
[BoxGroup("컴포넌트/컴포넌트", ShowLabel = false)]
|
||||
[Required, SerializeField] private Cannon cannon;
|
||||
|
||||
[BoxGroup("컴포넌트/컴포넌트", ShowLabel = false)]
|
||||
[SerializeField] private RayfireRigid[] rayfireRigids;
|
||||
|
||||
// 배의 기본 설정
|
||||
[field: TitleGroup("배의 기본 설정")]
|
||||
|
||||
// AI
|
||||
[BoxGroup("배의 기본 설정/AI")]
|
||||
[Tooltip("타겟 감지 거리"), Range(0f, 200f)]
|
||||
[SerializeField] private float viewRadius = 100f;
|
||||
|
||||
[BoxGroup("배의 기본 설정/AI")]
|
||||
[Tooltip("타겟의 정면 방향으로 Offset만큼의 위치를 목표 지점으로 설정"), Range(0f, 100f)]
|
||||
[SerializeField] private float targetForwardOffset = 50f;
|
||||
|
||||
[BoxGroup("배의 기본 설정/AI")]
|
||||
[Tooltip("타겟과 유지할 거리"), Range(0f, 100f)]
|
||||
[SerializeField] private float targetMaintainDistance = 40f;
|
||||
|
||||
[BoxGroup("배의 기본 설정/AI")]
|
||||
[Tooltip("타겟을 놓치기 시작한 거리"), Range(0f, 200f)]
|
||||
[SerializeField] private float missDistance = 100f;
|
||||
|
||||
[BoxGroup("배의 기본 설정/AI")]
|
||||
[Tooltip("타겟을 놓치기 시작한 거리"), Range(0f, 20f)]
|
||||
[SerializeField] private float missedTargetTime = 5f;
|
||||
|
||||
[BoxGroup("배의 기본 설정/AI")]
|
||||
[Tooltip("타겟을 완전히 놓친 후, 기다리는 시간"), Range(0f, 10f)]
|
||||
[SerializeField] private float returnPatrolWaitTime = 3f;
|
||||
|
||||
[BoxGroup("배의 기본 설정/AI")]
|
||||
[Tooltip("타겟과 유지할 거리"), Range(0f, 100f)]
|
||||
[SerializeField] private float cannonLaunchDistance = 60f;
|
||||
|
||||
// 체력
|
||||
[field: BoxGroup("배의 기본 설정/체력")]
|
||||
[field: Tooltip("배의 최대 체력"), Range(1f, 1000f)]
|
||||
[field: SerializeField] public float MaxHp { get; private set; } = 100f;
|
||||
|
||||
[field: BoxGroup("배의 기본 설정/체력")]
|
||||
[field: Tooltip("배의 현재 체력")]
|
||||
[field: SerializeField] public float CurrentHp { get; private set; }
|
||||
|
||||
// 기타
|
||||
[BoxGroup("배의 기본 설정/기타")]
|
||||
[SerializeField] private bool isDrawingGizmos = true;
|
||||
|
||||
[BoxGroup("배의 기본 설정/기타")]
|
||||
[SerializeField] private LayerMask targetLayer;
|
||||
|
||||
[field: SerializeField] public Collider Target { get; private set; }
|
||||
|
||||
private IAstarAI ai;
|
||||
private Collider[] hitColliders;
|
||||
private WaitForSeconds rescanTime = new(1f);
|
||||
private Coroutine findNearestTargetCoroutine;
|
||||
private Coroutine patrolCoroutine;
|
||||
private Coroutine chaseCoroutine;
|
||||
private Coroutine missedTargetCoroutine;
|
||||
|
||||
private const int MAX_HIT_SIZE = 5;
|
||||
|
||||
#endregion
|
||||
|
||||
@ -20,19 +94,270 @@ namespace BlueWaterProject
|
||||
***********************************************************************/
|
||||
#region Unity Events
|
||||
|
||||
private void OnDrawGizmosSelected()
|
||||
{
|
||||
if (!isDrawingGizmos) return;
|
||||
|
||||
var centerPosition = transform.position;
|
||||
|
||||
Gizmos.color = Color.red;
|
||||
Gizmos.DrawWireSphere(centerPosition, viewRadius);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
|
||||
InitStart();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
RotateCannon();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/***********************************************************************
|
||||
* Init Methods
|
||||
***********************************************************************/
|
||||
#region Init Methods
|
||||
|
||||
[Button("셋팅 초기화")]
|
||||
private void Init()
|
||||
{
|
||||
patrol = GetComponent<Patrol>();
|
||||
cannon = transform.Find("Cannon")?.GetComponent<Cannon>();
|
||||
}
|
||||
|
||||
private void InitStart()
|
||||
{
|
||||
ai = GetComponent<IAstarAI>();
|
||||
hitColliders = new Collider[MAX_HIT_SIZE];
|
||||
SetCurrentHp(MaxHp);
|
||||
|
||||
findNearestTargetCoroutine = StartCoroutine(nameof(FindNearestTargetCoroutine));
|
||||
|
||||
if (!Target)
|
||||
{
|
||||
patrolCoroutine = StartCoroutine(nameof(PatrolCoroutine));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/***********************************************************************
|
||||
* Interfaces
|
||||
***********************************************************************/
|
||||
#region Interfaces
|
||||
|
||||
public void TakeDamage(float attackerPower, Vector3? attackPos = null)
|
||||
{
|
||||
var changeHp = Mathf.Max(CurrentHp - attackerPower, 0f);
|
||||
|
||||
SetCurrentHp(changeHp);
|
||||
|
||||
if (CurrentHp == 0f)
|
||||
{
|
||||
Die();
|
||||
}
|
||||
}
|
||||
|
||||
public void Die()
|
||||
{
|
||||
if (ai != null)
|
||||
{
|
||||
ai.isStopped = true;
|
||||
}
|
||||
|
||||
foreach (var element in rayfireRigids)
|
||||
{
|
||||
if (element)
|
||||
{
|
||||
element.Demolish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public float GetCurrentHp() => CurrentHp;
|
||||
|
||||
#endregion
|
||||
|
||||
/***********************************************************************
|
||||
* Methods
|
||||
***********************************************************************/
|
||||
#region Methods
|
||||
|
||||
|
||||
private IEnumerator FindNearestTargetCoroutine()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
var centerPos = transform.position;
|
||||
var hitSize = Physics.OverlapSphereNonAlloc(centerPos, viewRadius, hitColliders, targetLayer, QueryTriggerInteraction.Ignore);
|
||||
|
||||
if (hitSize <= 0)
|
||||
{
|
||||
Target = null;
|
||||
yield return rescanTime;
|
||||
continue;
|
||||
}
|
||||
|
||||
var nearestDistance = float.PositiveInfinity;
|
||||
Collider nearestTargetCollider = null;
|
||||
for (var i = 0; i < hitSize; i++)
|
||||
{
|
||||
var distance = Vector3.Distance(centerPos, hitColliders[i].transform.position);
|
||||
|
||||
if (distance >= nearestDistance) continue;
|
||||
|
||||
nearestDistance = distance;
|
||||
nearestTargetCollider = hitColliders[i];
|
||||
}
|
||||
|
||||
Target = nearestTargetCollider;
|
||||
if (Target != null)
|
||||
{
|
||||
if (patrolCoroutine != null)
|
||||
{
|
||||
StopCoroutine(patrolCoroutine);
|
||||
patrolCoroutine = null;
|
||||
}
|
||||
|
||||
chaseCoroutine ??= StartCoroutine(nameof(ChaseCoroutine));
|
||||
findNearestTargetCoroutine = null;
|
||||
yield break;
|
||||
}
|
||||
|
||||
yield return rescanTime;
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator PatrolCoroutine()
|
||||
{
|
||||
if (patrol.WayPoints.Length <= 0) yield break;
|
||||
|
||||
var movePoint = patrol.GetCurrentWayPoint();
|
||||
SetDestination(movePoint);
|
||||
|
||||
while (ai.pathPending)
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
|
||||
while (!ai.reachedDestination)
|
||||
{
|
||||
SetDestination(movePoint);
|
||||
yield return null;
|
||||
}
|
||||
|
||||
var elapsedTime = 0f;
|
||||
var currentWaitTime = patrol.GetCurrentWayPointInfo().WaitTime;
|
||||
|
||||
while (elapsedTime < currentWaitTime)
|
||||
{
|
||||
elapsedTime += Time.deltaTime;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
patrol.SetMovePoint();
|
||||
patrolCoroutine = StartCoroutine(nameof(PatrolCoroutine));
|
||||
}
|
||||
|
||||
private IEnumerator ChaseCoroutine()
|
||||
{
|
||||
while (Target)
|
||||
{
|
||||
var targetTransform = Target.transform;
|
||||
var toTarget = targetTransform.position - transform.position;
|
||||
toTarget.y = 0f;
|
||||
var targetDistance = toTarget.magnitude;
|
||||
var targetDirection = toTarget.normalized;
|
||||
if (targetDistance > missDistance)
|
||||
{
|
||||
missedTargetCoroutine ??= StartCoroutine(nameof(MissedTargetCoroutine));
|
||||
}
|
||||
|
||||
var movePosition = targetTransform.position + targetTransform.forward * targetForwardOffset;
|
||||
if (targetDistance < targetMaintainDistance)
|
||||
{
|
||||
var crossDirection = Vector3.Cross(targetDirection, Vector3.up).normalized;
|
||||
movePosition = targetTransform.position + crossDirection * targetMaintainDistance;
|
||||
}
|
||||
|
||||
if (targetDistance < cannonLaunchDistance && !cannon.IsReloading)
|
||||
{
|
||||
cannon.LaunchAtTarget(Target);
|
||||
}
|
||||
|
||||
SetDestination(movePosition);
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
chaseCoroutine = null;
|
||||
}
|
||||
|
||||
private IEnumerator MissedTargetCoroutine()
|
||||
{
|
||||
var elapsedTime = 0f;
|
||||
while (elapsedTime <= missedTargetTime)
|
||||
{
|
||||
elapsedTime += Time.deltaTime;
|
||||
|
||||
var targetDistance = Vector3.Distance(transform.position, Target.transform.position);
|
||||
if (targetDistance <= missDistance)
|
||||
{
|
||||
missedTargetCoroutine = null;
|
||||
yield break;
|
||||
}
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
Target = null;
|
||||
ai.isStopped = true;
|
||||
yield return new WaitForSeconds(returnPatrolWaitTime);
|
||||
|
||||
missedTargetCoroutine = null;
|
||||
findNearestTargetCoroutine ??= StartCoroutine(nameof(FindNearestTargetCoroutine));
|
||||
patrolCoroutine ??= StartCoroutine(nameof(PatrolCoroutine));
|
||||
}
|
||||
|
||||
private void SetDestination(Vector3 position)
|
||||
{
|
||||
if (ai == null) return;
|
||||
|
||||
if (ai.isStopped)
|
||||
{
|
||||
ai.isStopped = false;
|
||||
}
|
||||
|
||||
ai.destination = position;
|
||||
}
|
||||
|
||||
private void RotateCannon()
|
||||
{
|
||||
if (!Target) return;
|
||||
|
||||
var directionToMouse = (Target.transform.position - transform.position).normalized;
|
||||
directionToMouse.y = 0f;
|
||||
|
||||
var lookRotation = Quaternion.LookRotation(directionToMouse);
|
||||
var cannonRotationDirection = Quaternion.Euler(0f, lookRotation.eulerAngles.y, 0f);
|
||||
|
||||
cannon.transform.rotation = cannonRotationDirection;
|
||||
}
|
||||
|
||||
public void HitAction(RaycastHit hit, float power, GameObject marker = null)
|
||||
{
|
||||
hit.transform.GetComponent<IDamageable>()?.TakeDamage(power);
|
||||
|
||||
cannon.SetActivePredictLine(false);
|
||||
if (marker)
|
||||
{
|
||||
Destroy(marker);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetCurrentHp(float value) => CurrentHp = value;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ public partial class @BlueWater: IInputActionCollection2, IDisposable
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""ToggleCannon"",
|
||||
""name"": ""ToggleLaunchMode"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""2d9a2349-b5a2-4926-a6e8-41abf2e24a3a"",
|
||||
""expectedControlType"": ""Button"",
|
||||
@ -163,7 +163,7 @@ public partial class @BlueWater: IInputActionCollection2, IDisposable
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""FireCannon"",
|
||||
""name"": ""LaunchCannon"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""36407aa9-c5a9-4654-8452-ac5c52abf32f"",
|
||||
""expectedControlType"": ""Button"",
|
||||
@ -407,7 +407,7 @@ public partial class @BlueWater: IInputActionCollection2, IDisposable
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""Keyboard&Mouse"",
|
||||
""action"": ""FireCannon"",
|
||||
""action"": ""LaunchCannon"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
@ -440,7 +440,7 @@ public partial class @BlueWater: IInputActionCollection2, IDisposable
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": ""Keyboard&Mouse"",
|
||||
""action"": ""ToggleCannon"",
|
||||
""action"": ""ToggleLaunchMode"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
}
|
||||
@ -620,8 +620,8 @@ public partial class @BlueWater: IInputActionCollection2, IDisposable
|
||||
m_Player_Attack = m_Player.FindAction("Attack", throwIfNotFound: true);
|
||||
m_Player_Dash = m_Player.FindAction("Dash", throwIfNotFound: true);
|
||||
m_Player_ActivateMainSkill = m_Player.FindAction("ActivateMainSkill", throwIfNotFound: true);
|
||||
m_Player_ToggleCannon = m_Player.FindAction("ToggleCannon", throwIfNotFound: true);
|
||||
m_Player_FireCannon = m_Player.FindAction("FireCannon", throwIfNotFound: true);
|
||||
m_Player_ToggleLaunchMode = m_Player.FindAction("ToggleLaunchMode", throwIfNotFound: true);
|
||||
m_Player_LaunchCannon = m_Player.FindAction("LaunchCannon", throwIfNotFound: true);
|
||||
m_Player_ShiftKey = m_Player.FindAction("ShiftKey", throwIfNotFound: true);
|
||||
m_Player_BuildMode = m_Player.FindAction("BuildMode", throwIfNotFound: true);
|
||||
// Camera
|
||||
@ -708,8 +708,8 @@ public partial class @BlueWater: IInputActionCollection2, IDisposable
|
||||
private readonly InputAction m_Player_Attack;
|
||||
private readonly InputAction m_Player_Dash;
|
||||
private readonly InputAction m_Player_ActivateMainSkill;
|
||||
private readonly InputAction m_Player_ToggleCannon;
|
||||
private readonly InputAction m_Player_FireCannon;
|
||||
private readonly InputAction m_Player_ToggleLaunchMode;
|
||||
private readonly InputAction m_Player_LaunchCannon;
|
||||
private readonly InputAction m_Player_ShiftKey;
|
||||
private readonly InputAction m_Player_BuildMode;
|
||||
public struct PlayerActions
|
||||
@ -730,8 +730,8 @@ public partial class @BlueWater: IInputActionCollection2, IDisposable
|
||||
public InputAction @Attack => m_Wrapper.m_Player_Attack;
|
||||
public InputAction @Dash => m_Wrapper.m_Player_Dash;
|
||||
public InputAction @ActivateMainSkill => m_Wrapper.m_Player_ActivateMainSkill;
|
||||
public InputAction @ToggleCannon => m_Wrapper.m_Player_ToggleCannon;
|
||||
public InputAction @FireCannon => m_Wrapper.m_Player_FireCannon;
|
||||
public InputAction @ToggleLaunchMode => m_Wrapper.m_Player_ToggleLaunchMode;
|
||||
public InputAction @LaunchCannon => m_Wrapper.m_Player_LaunchCannon;
|
||||
public InputAction @ShiftKey => m_Wrapper.m_Player_ShiftKey;
|
||||
public InputAction @BuildMode => m_Wrapper.m_Player_BuildMode;
|
||||
public InputActionMap Get() { return m_Wrapper.m_Player; }
|
||||
@ -785,12 +785,12 @@ public partial class @BlueWater: IInputActionCollection2, IDisposable
|
||||
@ActivateMainSkill.started += instance.OnActivateMainSkill;
|
||||
@ActivateMainSkill.performed += instance.OnActivateMainSkill;
|
||||
@ActivateMainSkill.canceled += instance.OnActivateMainSkill;
|
||||
@ToggleCannon.started += instance.OnToggleCannon;
|
||||
@ToggleCannon.performed += instance.OnToggleCannon;
|
||||
@ToggleCannon.canceled += instance.OnToggleCannon;
|
||||
@FireCannon.started += instance.OnFireCannon;
|
||||
@FireCannon.performed += instance.OnFireCannon;
|
||||
@FireCannon.canceled += instance.OnFireCannon;
|
||||
@ToggleLaunchMode.started += instance.OnToggleLaunchMode;
|
||||
@ToggleLaunchMode.performed += instance.OnToggleLaunchMode;
|
||||
@ToggleLaunchMode.canceled += instance.OnToggleLaunchMode;
|
||||
@LaunchCannon.started += instance.OnLaunchCannon;
|
||||
@LaunchCannon.performed += instance.OnLaunchCannon;
|
||||
@LaunchCannon.canceled += instance.OnLaunchCannon;
|
||||
@ShiftKey.started += instance.OnShiftKey;
|
||||
@ShiftKey.performed += instance.OnShiftKey;
|
||||
@ShiftKey.canceled += instance.OnShiftKey;
|
||||
@ -843,12 +843,12 @@ public partial class @BlueWater: IInputActionCollection2, IDisposable
|
||||
@ActivateMainSkill.started -= instance.OnActivateMainSkill;
|
||||
@ActivateMainSkill.performed -= instance.OnActivateMainSkill;
|
||||
@ActivateMainSkill.canceled -= instance.OnActivateMainSkill;
|
||||
@ToggleCannon.started -= instance.OnToggleCannon;
|
||||
@ToggleCannon.performed -= instance.OnToggleCannon;
|
||||
@ToggleCannon.canceled -= instance.OnToggleCannon;
|
||||
@FireCannon.started -= instance.OnFireCannon;
|
||||
@FireCannon.performed -= instance.OnFireCannon;
|
||||
@FireCannon.canceled -= instance.OnFireCannon;
|
||||
@ToggleLaunchMode.started -= instance.OnToggleLaunchMode;
|
||||
@ToggleLaunchMode.performed -= instance.OnToggleLaunchMode;
|
||||
@ToggleLaunchMode.canceled -= instance.OnToggleLaunchMode;
|
||||
@LaunchCannon.started -= instance.OnLaunchCannon;
|
||||
@LaunchCannon.performed -= instance.OnLaunchCannon;
|
||||
@LaunchCannon.canceled -= instance.OnLaunchCannon;
|
||||
@ShiftKey.started -= instance.OnShiftKey;
|
||||
@ShiftKey.performed -= instance.OnShiftKey;
|
||||
@ShiftKey.canceled -= instance.OnShiftKey;
|
||||
@ -1022,8 +1022,8 @@ public partial class @BlueWater: IInputActionCollection2, IDisposable
|
||||
void OnAttack(InputAction.CallbackContext context);
|
||||
void OnDash(InputAction.CallbackContext context);
|
||||
void OnActivateMainSkill(InputAction.CallbackContext context);
|
||||
void OnToggleCannon(InputAction.CallbackContext context);
|
||||
void OnFireCannon(InputAction.CallbackContext context);
|
||||
void OnToggleLaunchMode(InputAction.CallbackContext context);
|
||||
void OnLaunchCannon(InputAction.CallbackContext context);
|
||||
void OnShiftKey(InputAction.CallbackContext context);
|
||||
void OnBuildMode(InputAction.CallbackContext context);
|
||||
}
|
||||
|
@ -132,7 +132,7 @@
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "ToggleCannon",
|
||||
"name": "ToggleLaunchMode",
|
||||
"type": "Button",
|
||||
"id": "2d9a2349-b5a2-4926-a6e8-41abf2e24a3a",
|
||||
"expectedControlType": "Button",
|
||||
@ -141,7 +141,7 @@
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "FireCannon",
|
||||
"name": "LaunchCannon",
|
||||
"type": "Button",
|
||||
"id": "36407aa9-c5a9-4654-8452-ac5c52abf32f",
|
||||
"expectedControlType": "Button",
|
||||
@ -385,7 +385,7 @@
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
"action": "FireCannon",
|
||||
"action": "LaunchCannon",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
@ -418,7 +418,7 @@
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Keyboard&Mouse",
|
||||
"action": "ToggleCannon",
|
||||
"action": "ToggleLaunchMode",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
using RayFire;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
@ -20,6 +21,9 @@ namespace BlueWaterProject
|
||||
[BoxGroup("컴포넌트/컴포넌트", ShowLabel = false)]
|
||||
[Required, SerializeField] private Rigidbody rb;
|
||||
|
||||
[BoxGroup("컴포넌트/컴포넌트", ShowLabel = false)]
|
||||
[SerializeField] private RayfireRigid[] rayfireRigids;
|
||||
|
||||
// 배의 기본 설정
|
||||
[TitleGroup("배의 기본 설정")]
|
||||
|
||||
@ -66,9 +70,6 @@ namespace BlueWaterProject
|
||||
[field: BoxGroup("배의 기본 설정/기타")]
|
||||
[field: Tooltip("배의 힘(충돌)")]
|
||||
[field: SerializeField] public int Strength { get; set; } = 500;
|
||||
|
||||
[BoxGroup("배의 기본 설정/기타")]
|
||||
[SerializeField] private LayerMask waterLayer;
|
||||
|
||||
[BoxGroup("배의 기본 설정/기타")]
|
||||
[SerializeField] private LayerMask groundLayer;
|
||||
@ -262,13 +263,17 @@ namespace BlueWaterProject
|
||||
{
|
||||
Die();
|
||||
}
|
||||
|
||||
print("오브젝트 충돌 - 현재 체력 : " + CurrentHp);
|
||||
}
|
||||
|
||||
public void Die()
|
||||
{
|
||||
print("배 파괴 - 현재 체력 : " + CurrentHp);
|
||||
foreach (var element in rayfireRigids)
|
||||
{
|
||||
if (element)
|
||||
{
|
||||
element.Demolish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public float GetCurrentHp() => CurrentHp;
|
||||
|
@ -4,13 +4,13 @@ using UnityEngine;
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
[CustomEditor(typeof(ShipPatrol),true)]
|
||||
[CustomEditor(typeof(Patrol),true)]
|
||||
public class ShipPatrolEditor : Editor
|
||||
{
|
||||
private void OnSceneGUI()
|
||||
{
|
||||
Handles.color = Color.green;
|
||||
var patrol = (ShipPatrol)target;
|
||||
var patrol = (Patrol)target;
|
||||
|
||||
for (var i = 0; i < patrol.WayPoints.Length; i++)
|
||||
{
|
||||
@ -37,7 +37,7 @@ namespace BlueWaterProject
|
||||
|
||||
private Vector3 ApplyAxisLock(Vector3 oldPoint, Vector3 newPoint)
|
||||
{
|
||||
var patrolSetting = (ShipPatrol)target;
|
||||
var patrolSetting = (Patrol)target;
|
||||
if (patrolSetting.LockHandlesOnXAxis)
|
||||
{
|
||||
newPoint.x = oldPoint.x;
|
||||
|
@ -5,12 +5,12 @@ namespace BlueWaterProject
|
||||
{
|
||||
public interface IPatrol
|
||||
{
|
||||
WayPoint[] WayPoints { get; set; }
|
||||
WayPointInfo[] WayPoints { get; set; }
|
||||
Vector3 OriginalPoint { get; set; }
|
||||
int CurrentIndex { get; set; }
|
||||
int PreviousIndex { get; set; }
|
||||
|
||||
WayPoint GetCurrentWayPoint();
|
||||
WayPointInfo GetCurrentWayPointInfo();
|
||||
int GetNextIndex();
|
||||
bool HasReachedDestination();
|
||||
void SetMovePoint();
|
||||
|
@ -1,9 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using Random = UnityEngine.Random;
|
||||
using UnityEngine.Events;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
@ -31,9 +29,6 @@ namespace BlueWaterProject
|
||||
|
||||
// 컴포넌트
|
||||
[TitleGroup("컴포넌트"), BoxGroup("컴포넌트/컴포넌트", ShowLabel = false)]
|
||||
[Required, SerializeField] private PlayerInput playerInput;
|
||||
|
||||
[BoxGroup("컴포넌트/컴포넌트", ShowLabel = false)]
|
||||
[Required, SerializeField] private GameObject projectileObject;
|
||||
|
||||
[BoxGroup("컴포넌트/컴포넌트", ShowLabel = false)]
|
||||
@ -43,32 +38,25 @@ namespace BlueWaterProject
|
||||
[Required, SerializeField] private Transform launchTransform;
|
||||
|
||||
[BoxGroup("컴포넌트/컴포넌트", ShowLabel = false)]
|
||||
[Required, SerializeField] private LineRenderer predictedLine;
|
||||
[SerializeField] private LineRenderer predictedLine;
|
||||
|
||||
[BoxGroup("컴포넌트/컴포넌트", ShowLabel = false)]
|
||||
[SerializeField] private GameObject hitMarker;
|
||||
|
||||
[BoxGroup("컴포넌트/컴포넌트", ShowLabel = false)]
|
||||
[SerializeField] private GameObject directionIndicator;
|
||||
|
||||
[BoxGroup("컴포넌트/컴포넌트", ShowLabel = false)]
|
||||
[SerializeField] private ProcessBar launchProcessBar;
|
||||
|
||||
[BoxGroup("컴포넌트/컴포넌트", ShowLabel = false)]
|
||||
[Required, SerializeField] private Transform instantiateObjects;
|
||||
|
||||
// 대포 기본 설정
|
||||
[TitleGroup("대포 기본 설정")]
|
||||
|
||||
// 게이지
|
||||
[BoxGroup("대포 기본 설정/게이지")]
|
||||
[Range(0.1f, 5f), Tooltip("게이지가 모두 차는데 걸리는 시간\n게이지는 0 ~ 1의 값을 가짐")]
|
||||
[SerializeField] private float gaugeChargingTime = 1f;
|
||||
[field: TitleGroup("대포 기본 설정")]
|
||||
|
||||
// 발사 기능
|
||||
[field: BoxGroup("대포 기본 설정/발사 기능")]
|
||||
[field: Range(0f, 10f), Tooltip("발사 재사용 시간")]
|
||||
[field: SerializeField] public float LaunchCooldown { get; set; } = 1f;
|
||||
|
||||
[BoxGroup("대포 기본 설정/발사 기능")]
|
||||
[Range(0f, 3f), Tooltip("발사 재사용 시간")]
|
||||
[SerializeField] private float launchCooldown = 1f;
|
||||
[Tooltip("대포 공격력")]
|
||||
[SerializeField] private float damage = 20f;
|
||||
|
||||
[BoxGroup("대포 기본 설정/발사 기능")]
|
||||
[Range(1f, 100f), Tooltip("발사될 거리 계수\nchargingGauge * 변수값")]
|
||||
@ -99,52 +87,23 @@ namespace BlueWaterProject
|
||||
[SerializeField] private float lineInterval = 0.025f;
|
||||
|
||||
// 기타
|
||||
[BoxGroup("대포 기본 설정/기타")]
|
||||
[Tooltip("랜덤으로 잡힐 물고기 마릿수 x, y를 포함하는 사이의 값")]
|
||||
[SerializeField] private Vector2 randomCatch = new(1, 4);
|
||||
|
||||
[BoxGroup("대포 기본 설정/기타")]
|
||||
[SerializeField] private float mouseRayDistance = 500f;
|
||||
|
||||
[BoxGroup("대포 기본 설정/기타")]
|
||||
[SerializeField] private float rayDistance = 100f;
|
||||
|
||||
[BoxGroup("대포 기본 설정/기타")]
|
||||
[SerializeField] private LayerMask hitLayer;
|
||||
|
||||
[BoxGroup("대포 기본 설정/기타")]
|
||||
[SerializeField] private LayerMask waterLayer;
|
||||
|
||||
[BoxGroup("대포 기본 설정/기타")]
|
||||
[SerializeField] private LayerMask boidsLayer;
|
||||
|
||||
// 카메라 효과 옵션
|
||||
[TitleGroup("카메라"), BoxGroup("카메라/카메라 흔들림 효과", ShowLabel = false)]
|
||||
[SerializeField] private float cameraShakePower = 2f;
|
||||
|
||||
[BoxGroup("카메라/카메라 흔들림 효과", ShowLabel = false)]
|
||||
[SerializeField] private float cameraShakeDuration = 0.3f;
|
||||
|
||||
// 실시간 상태
|
||||
[TitleGroup("실시간 상태")]
|
||||
[DisableIf("@true")]
|
||||
[SerializeField] private bool isLaunchMode;
|
||||
[DisableIf("@true")]
|
||||
[SerializeField] private bool isCharging;
|
||||
[DisableIf("@true")]
|
||||
[SerializeField] private bool isReloading;
|
||||
[DisableIf("@true")]
|
||||
[SerializeField] private float chargingGauge;
|
||||
[DisableIf("@true")]
|
||||
[SerializeField] private float previousGauge;
|
||||
|
||||
private float cannonRadius;
|
||||
[field: TitleGroup("실시간 상태")]
|
||||
[field: DisableIf("@true")]
|
||||
[field: SerializeField] public bool IsReloading { get; set; }
|
||||
|
||||
public UnityEvent<RaycastHit, float, GameObject> onHitAction;
|
||||
|
||||
public float CannonRadius { get; private set; }
|
||||
private Vector3 launchVelocity;
|
||||
private Collider[] hitColliders;
|
||||
private GameObject newHitMarker;
|
||||
private RaycastHit endPositionHit;
|
||||
|
||||
private const int MAX_HIT_SIZE = 8;
|
||||
|
||||
#endregion
|
||||
|
||||
@ -155,30 +114,7 @@ namespace BlueWaterProject
|
||||
|
||||
private void Start()
|
||||
{
|
||||
cannonRadius = projectileObject.GetComponent<SphereCollider>()?.radius ??
|
||||
projectileObject.GetComponent<ParticleWeapon>().colliderRadius;
|
||||
|
||||
launchProcessBar = UiManager.Inst.OceanUi.ProcessBar;
|
||||
hitColliders = new Collider[MAX_HIT_SIZE];
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
playerInput.actions.FindAction("ToggleCannon").started += _ => ToggleCannon();
|
||||
playerInput.actions.FindAction("FireCannon").started += _ => ChargeCannon();
|
||||
playerInput.actions.FindAction("FireCannon").canceled += _ => FireCannon();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
playerInput.actions.FindAction("ToggleCannon").started -= _ => ToggleCannon();
|
||||
playerInput.actions.FindAction("FireCannon").started -= _ => ChargeCannon();
|
||||
playerInput.actions.FindAction("FireCannon").canceled -= _ => FireCannon();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
HandleFireCannon();
|
||||
InitStart();
|
||||
}
|
||||
|
||||
#endregion
|
||||
@ -191,7 +127,6 @@ namespace BlueWaterProject
|
||||
[Button("셋팅 초기화")]
|
||||
private void Init()
|
||||
{
|
||||
playerInput = GetComponentInParent<PlayerInput>();
|
||||
projectileObject = Utils.LoadFromFolder<GameObject>("Assets/05.Prefabs/Particles/GrenadeFire", "GrenadeFireOBJ", ".prefab");
|
||||
visualLook = transform.Find("VisualLook");
|
||||
launchTransform = transform.Find("LaunchPosition");
|
||||
@ -201,85 +136,12 @@ namespace BlueWaterProject
|
||||
predictedLine.gameObject.SetActive(false);
|
||||
}
|
||||
hitMarker = Utils.LoadFromFolder<GameObject>("Assets/05.Prefabs", "HitMarker", ".prefab");
|
||||
// directionIndicator = transform.parent.Find("DirectionIndicator")?.gameObject;
|
||||
// if (directionIndicator)
|
||||
// {
|
||||
// directionIndicator.SetActive(false);
|
||||
// }
|
||||
instantiateObjects = GameObject.Find("InstantiateObjects").transform;
|
||||
|
||||
waterLayer = LayerMask.GetMask("Water");
|
||||
boidsLayer = LayerMask.GetMask("Boids");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/***********************************************************************
|
||||
* PlayerInput
|
||||
***********************************************************************/
|
||||
#region PlayerInput
|
||||
|
||||
private void ToggleCannon()
|
||||
private void InitStart()
|
||||
{
|
||||
isLaunchMode = !isLaunchMode;
|
||||
if (directionIndicator)
|
||||
{
|
||||
directionIndicator.SetActive(isLaunchMode);
|
||||
}
|
||||
launchProcessBar.SetActive(isLaunchMode);
|
||||
|
||||
if (!isLaunchMode)
|
||||
{
|
||||
isCharging = false;
|
||||
predictedLine.gameObject.SetActive(false);
|
||||
if (newHitMarker)
|
||||
{
|
||||
Destroy(newHitMarker);
|
||||
}
|
||||
chargingGauge = 0f;
|
||||
previousGauge = chargingGauge;
|
||||
launchProcessBar.SetFillAmount(0f);
|
||||
launchProcessBar.SetRotateZ(previousGauge * -360f);
|
||||
launchProcessBar.SetRotateZ(0f);
|
||||
launchProcessBar.SetSliderValue(0f);
|
||||
}
|
||||
}
|
||||
|
||||
private void ChargeCannon()
|
||||
{
|
||||
if (!isLaunchMode) return;
|
||||
|
||||
if (isReloading)
|
||||
{
|
||||
StartCoroutine(UiManager.Inst.OceanUi.ProcessBar.ShakeProcessBarCoroutine());
|
||||
}
|
||||
else
|
||||
{
|
||||
predictedLine.gameObject.SetActive(true);
|
||||
if (hitMarker)
|
||||
{
|
||||
newHitMarker = Instantiate(hitMarker, Vector3.zero, hitMarker.transform.rotation, instantiateObjects);
|
||||
newHitMarker.transform.localScale *= cannonRadius * 2f;
|
||||
hitMarker.SetActive(true);
|
||||
}
|
||||
isCharging = true;
|
||||
chargingGauge = 0f;
|
||||
}
|
||||
}
|
||||
|
||||
private void FireCannon()
|
||||
{
|
||||
if (!isLaunchMode || !isCharging) return;
|
||||
|
||||
isCharging = false;
|
||||
predictedLine.gameObject.SetActive(false);
|
||||
previousGauge = chargingGauge;
|
||||
chargingGauge = 0f;
|
||||
launchProcessBar.SetFillAmount(0f);
|
||||
launchProcessBar.SetRotateZ(previousGauge * -360f);
|
||||
Launch();
|
||||
|
||||
StartCoroutine(LaunchCoolDown(launchCooldown));
|
||||
CannonRadius = projectileObject.GetComponent<SphereCollider>()?.radius ??
|
||||
projectileObject.GetComponent<ParticleWeapon>().colliderRadius;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@ -289,52 +151,9 @@ namespace BlueWaterProject
|
||||
***********************************************************************/
|
||||
#region Methods
|
||||
|
||||
private void HandleFireCannon()
|
||||
{
|
||||
if (!isLaunchMode) return;
|
||||
|
||||
var ray = CameraManager.Inst.MainCam.ScreenPointToRay(Input.mousePosition);
|
||||
|
||||
if (Physics.Raycast(ray, out var hit, mouseRayDistance, waterLayer, QueryTriggerInteraction.Collide))
|
||||
{
|
||||
var directionToMouse = (hit.point - transform.position).normalized;
|
||||
directionToMouse.y = 0f;
|
||||
|
||||
var lookRotation = Quaternion.LookRotation(directionToMouse);
|
||||
var cannonRotationDirection = Quaternion.Euler(0f, lookRotation.eulerAngles.y, 0f);
|
||||
if (directionIndicator)
|
||||
{
|
||||
directionIndicator.transform.rotation = cannonRotationDirection;
|
||||
}
|
||||
|
||||
transform.rotation = cannonRotationDirection;
|
||||
}
|
||||
|
||||
if (!isCharging) return;
|
||||
|
||||
if (chargingGauge < 1f)
|
||||
{
|
||||
if (gaugeChargingTime == 0f)
|
||||
{
|
||||
gaugeChargingTime = 1f;
|
||||
}
|
||||
|
||||
chargingGauge += 1 / gaugeChargingTime * Time.deltaTime;
|
||||
chargingGauge = Mathf.Clamp(chargingGauge, 0f, 1f);
|
||||
}
|
||||
else
|
||||
{
|
||||
chargingGauge = 1f;
|
||||
}
|
||||
launchProcessBar.SetFillAmount(chargingGauge);
|
||||
|
||||
CalculateLaunchTrajectory();
|
||||
}
|
||||
|
||||
private void CalculateLaunchTrajectory()
|
||||
public void CalculateLaunchTrajectory(Vector3 endPosition, bool isPredict = false)
|
||||
{
|
||||
var startPosition = launchTransform.position;
|
||||
var endPosition = CalculateEndPosition();
|
||||
var d = Vector3.Distance(new Vector3(endPosition.x, 0, endPosition.z), new Vector3(startPosition.x, 0, startPosition.z));
|
||||
var h = endPosition.y - startPosition.y;
|
||||
|
||||
@ -350,7 +169,7 @@ namespace BlueWaterProject
|
||||
var g = Physics.gravity.magnitude;
|
||||
var v0 = Mathf.Sqrt((g * d * d) / (2 * Mathf.Cos(theta) * Mathf.Cos(theta) * (d * Mathf.Tan(theta) - h)));
|
||||
|
||||
launchVelocity = CalculateVelocityFromAngleAndSpeed(startPosition, theta, v0);
|
||||
launchVelocity = CalculateVelocityFromAngleAndSpeed(theta, v0);
|
||||
break;
|
||||
case LaunchType.FIXED_SPEED:
|
||||
var targetDirection = (endPosition - startPosition).normalized;
|
||||
@ -370,7 +189,10 @@ namespace BlueWaterProject
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
PredictLine(startPosition);
|
||||
if (isPredict)
|
||||
{
|
||||
PredictLine(startPosition);
|
||||
}
|
||||
}
|
||||
|
||||
private float CalculateAngleForFixedSpeed(float x, float y, float speed)
|
||||
@ -393,7 +215,7 @@ namespace BlueWaterProject
|
||||
return selectedAngle;
|
||||
}
|
||||
|
||||
private Vector3 CalculateEndPosition()
|
||||
public Vector3 CalculateEndPosition(float chargingGauge)
|
||||
{
|
||||
var direction = transform.forward;
|
||||
direction.y = 0f;
|
||||
@ -409,7 +231,7 @@ namespace BlueWaterProject
|
||||
return startPosition;
|
||||
}
|
||||
|
||||
private Vector3 CalculateVelocityFromAngleAndSpeed(Vector3 startPosition, float angleRad, float speed)
|
||||
private Vector3 CalculateVelocityFromAngleAndSpeed(float angleRad, float speed)
|
||||
{
|
||||
var direction = launchTransform.forward;
|
||||
direction.y = 0;
|
||||
@ -437,7 +259,7 @@ namespace BlueWaterProject
|
||||
predictPosition = nextPosition;
|
||||
UpdateLineRender(lineMaxPoint, (i, predictPosition));
|
||||
|
||||
if (Physics.Raycast(predictPosition - currentVelocity.normalized * lineInterval, currentVelocity.normalized, out var hit, cannonRadius * 2, hitLayer, QueryTriggerInteraction.Collide))
|
||||
if (Physics.Raycast(predictPosition - currentVelocity.normalized * lineInterval, currentVelocity.normalized, out var hit, CannonRadius * 2, hitLayer, QueryTriggerInteraction.Collide))
|
||||
{
|
||||
UpdateLineRender(i + 1, (i, predictPosition));
|
||||
|
||||
@ -459,68 +281,60 @@ namespace BlueWaterProject
|
||||
currentVelocity *= Mathf.Clamp01(1f - drag * increment);
|
||||
return currentVelocity;
|
||||
}
|
||||
|
||||
|
||||
private void UpdateLineRender(int count, (int point, Vector3 pos) pointPos)
|
||||
{
|
||||
predictedLine.positionCount = count;
|
||||
predictedLine.SetPosition(pointPos.point, pointPos.pos);
|
||||
}
|
||||
|
||||
private IEnumerator LaunchCoolDown(float waitTime)
|
||||
|
||||
public void Launch()
|
||||
{
|
||||
var time = 0f;
|
||||
launchProcessBar.SetSliderValue(0f);
|
||||
launchProcessBar.SetActiveReloadSlider(true);
|
||||
|
||||
while (time <= waitTime)
|
||||
{
|
||||
time += Time.deltaTime;
|
||||
var sliderValue = time > 0 ? time / waitTime : 0f;
|
||||
launchProcessBar.SetSliderValue(sliderValue);
|
||||
yield return null;
|
||||
}
|
||||
|
||||
isReloading = false;
|
||||
launchProcessBar.SetActiveReloadSlider(false);
|
||||
}
|
||||
|
||||
private void Launch()
|
||||
{
|
||||
VisualFeedbackManager.Inst.CameraShake(CameraManager.Inst.OceanCamera.BaseShipCam, cameraShakePower, cameraShakeDuration);
|
||||
var projectile = Instantiate(projectileObject, launchTransform.position, Quaternion.identity);
|
||||
var particleWeapon = projectile.GetComponent<ParticleWeapon>();
|
||||
particleWeapon.SetHitMarker(newHitMarker);
|
||||
particleWeapon.onHitAction.AddListener(HitAction);
|
||||
particleWeapon.onHitAction.AddListener((hit, _, marker) => onHitAction?.Invoke(hit, damage, marker));
|
||||
particleWeapon.Rb.AddForce(launchVelocity, ForceMode.VelocityChange);
|
||||
|
||||
isReloading = true;
|
||||
IsReloading = true;
|
||||
}
|
||||
|
||||
private void HitAction(RaycastHit hit, float power, GameObject marker = null)
|
||||
public void LaunchAtTarget(Collider target)
|
||||
{
|
||||
if (hit.collider.gameObject.layer == LayerMask.NameToLayer("Water"))
|
||||
{
|
||||
var maxSize = Physics.OverlapSphereNonAlloc(hit.point, cannonRadius, hitColliders, boidsLayer,
|
||||
QueryTriggerInteraction.Collide);
|
||||
CalculateLaunchTrajectory(target.bounds.center, true);
|
||||
StartChargeCannon();
|
||||
Launch();
|
||||
StartCoroutine(Utils.CoolDown(LaunchCooldown, () => IsReloading = false));
|
||||
}
|
||||
|
||||
for (var i = 0; i < maxSize; i++)
|
||||
{
|
||||
var hitBoids = hitColliders[i].GetComponentInParent<Boids>();
|
||||
var catchSize = Random.Range((int)randomCatch.x, (int)randomCatch.y + 1);
|
||||
hitBoids.CatchBoid(hitColliders[i], catchSize);
|
||||
}
|
||||
}
|
||||
else
|
||||
public void ExitLaunchMode()
|
||||
{
|
||||
SetActivePredictLine(false);
|
||||
if (newHitMarker)
|
||||
{
|
||||
hit.transform.GetComponent<IDamageable>()?.TakeDamage(power);
|
||||
}
|
||||
|
||||
if (marker)
|
||||
{
|
||||
Destroy(marker);
|
||||
Destroy(newHitMarker);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void StartChargeCannon()
|
||||
{
|
||||
SetActivePredictLine(true);
|
||||
if (hitMarker)
|
||||
{
|
||||
newHitMarker = Instantiate(hitMarker, Vector3.zero, hitMarker.transform.rotation, instantiateObjects);
|
||||
newHitMarker.transform.localScale *= CannonRadius * 2f;
|
||||
hitMarker.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetActivePredictLine(bool value)
|
||||
{
|
||||
if (isUsingPredictLine)
|
||||
{
|
||||
predictedLine.gameObject.SetActive(value);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
265
BlueWater/Assets/02.Scripts/Player/CannonController.cs
Normal file
265
BlueWater/Assets/02.Scripts/Player/CannonController.cs
Normal file
@ -0,0 +1,265 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
public class CannonController : MonoBehaviour
|
||||
{
|
||||
/***********************************************************************
|
||||
* Variables
|
||||
***********************************************************************/
|
||||
#region Variables
|
||||
|
||||
// 컴포넌트
|
||||
[TitleGroup("컴포넌트"), BoxGroup("컴포넌트/컴포넌트", ShowLabel = false)]
|
||||
[Required, SerializeField] private Cannon cannon;
|
||||
|
||||
[BoxGroup("컴포넌트/컴포넌트", ShowLabel = false)]
|
||||
[Required, SerializeField] private PlayerInput playerInput;
|
||||
|
||||
[BoxGroup("컴포넌트/컴포넌트", ShowLabel = false)]
|
||||
[SerializeField] private ProcessBar launchProcessBar;
|
||||
|
||||
// 대포 기본 설정
|
||||
[TitleGroup("대포 기본 설정")]
|
||||
|
||||
// 게이지
|
||||
[BoxGroup("대포 기본 설정/게이지")]
|
||||
[Range(0.1f, 5f), Tooltip("게이지가 모두 차는데 걸리는 시간\n게이지는 0 ~ 1의 값을 가짐")]
|
||||
[SerializeField] private float gaugeChargingTime = 1f;
|
||||
|
||||
// 기타
|
||||
[BoxGroup("대포 기본 설정/기타")]
|
||||
[Tooltip("랜덤으로 잡힐 물고기 마릿수 x, y를 포함하는 사이의 값")]
|
||||
[SerializeField] private Vector2 randomCatch = new(1, 4);
|
||||
|
||||
[BoxGroup("대포 기본 설정/기타")]
|
||||
[SerializeField] private float mouseRayDistance = 500f;
|
||||
|
||||
[BoxGroup("대포 기본 설정/기타")]
|
||||
[SerializeField] private LayerMask waterLayer;
|
||||
|
||||
[BoxGroup("대포 기본 설정/기타")]
|
||||
[SerializeField] private LayerMask boidsLayer;
|
||||
|
||||
// 카메라 효과 옵션
|
||||
[TitleGroup("카메라"), BoxGroup("카메라/카메라 흔들림 효과", ShowLabel = false)]
|
||||
[SerializeField] private float cameraShakePower = 2f;
|
||||
|
||||
[BoxGroup("카메라/카메라 흔들림 효과", ShowLabel = false)]
|
||||
[SerializeField] private float cameraShakeDuration = 0.3f;
|
||||
|
||||
// 실시간 상태
|
||||
[TitleGroup("실시간 상태")]
|
||||
[DisableIf("@true")]
|
||||
[SerializeField] private bool isLaunchMode;
|
||||
[DisableIf("@true")]
|
||||
[SerializeField] private bool isCharging;
|
||||
[DisableIf("@true")]
|
||||
[SerializeField] private float chargingGauge;
|
||||
[DisableIf("@true")]
|
||||
[SerializeField] private float previousGauge;
|
||||
|
||||
private Collider[] hitColliders;
|
||||
|
||||
private const int MAX_HIT_SIZE = 8;
|
||||
|
||||
#endregion
|
||||
|
||||
/***********************************************************************
|
||||
* Unity Events
|
||||
***********************************************************************/
|
||||
#region Unity Events
|
||||
|
||||
private void Start()
|
||||
{
|
||||
launchProcessBar = UiManager.Inst.OceanUi.ProcessBar;
|
||||
hitColliders = new Collider[MAX_HIT_SIZE];
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
playerInput.actions.FindAction("ToggleLaunchMode").started += _ => ToggleLaunchMode();
|
||||
playerInput.actions.FindAction("LaunchCannon").started += _ => ChargeCannon();
|
||||
playerInput.actions.FindAction("LaunchCannon").canceled += _ => LaunchCannon();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
playerInput.actions.FindAction("ToggleLaunchMode").started -= _ => ToggleLaunchMode();
|
||||
playerInput.actions.FindAction("LaunchCannon").started -= _ => ChargeCannon();
|
||||
playerInput.actions.FindAction("LaunchCannon").canceled -= _ => LaunchCannon();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
HandleLaunchCannon();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/***********************************************************************
|
||||
* Init Methods
|
||||
***********************************************************************/
|
||||
#region Init Methods
|
||||
|
||||
[Button("셋팅 초기화")]
|
||||
private void Init()
|
||||
{
|
||||
cannon = GetComponent<Cannon>();
|
||||
playerInput = GetComponentInParent<PlayerInput>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/***********************************************************************
|
||||
* PlayerInput
|
||||
***********************************************************************/
|
||||
#region PlayerInput
|
||||
|
||||
private void ToggleLaunchMode()
|
||||
{
|
||||
isLaunchMode = !isLaunchMode;
|
||||
launchProcessBar.SetActive(isLaunchMode);
|
||||
|
||||
if (!isLaunchMode)
|
||||
{
|
||||
isCharging = false;
|
||||
chargingGauge = 0f;
|
||||
previousGauge = chargingGauge;
|
||||
launchProcessBar.SetFillAmount(0f);
|
||||
launchProcessBar.SetRotateZ(previousGauge * -360f);
|
||||
launchProcessBar.SetRotateZ(0f);
|
||||
launchProcessBar.SetSliderValue(0f);
|
||||
cannon.ExitLaunchMode();
|
||||
}
|
||||
}
|
||||
|
||||
private void ChargeCannon()
|
||||
{
|
||||
if (!isLaunchMode) return;
|
||||
|
||||
if (cannon.IsReloading)
|
||||
{
|
||||
StartCoroutine(UiManager.Inst.OceanUi.ProcessBar.ShakeProcessBarCoroutine());
|
||||
}
|
||||
else
|
||||
{
|
||||
isCharging = true;
|
||||
chargingGauge = 0f;
|
||||
cannon.StartChargeCannon();
|
||||
}
|
||||
}
|
||||
|
||||
private void LaunchCannon()
|
||||
{
|
||||
if (!isLaunchMode || !isCharging) return;
|
||||
|
||||
isCharging = false;
|
||||
previousGauge = chargingGauge;
|
||||
chargingGauge = 0f;
|
||||
launchProcessBar.SetFillAmount(0f);
|
||||
launchProcessBar.SetRotateZ(previousGauge * -360f);
|
||||
cannon.SetActivePredictLine(false);
|
||||
|
||||
cannon.Launch();
|
||||
StartCoroutine(LaunchCoolDown(cannon.LaunchCooldown));
|
||||
VisualFeedbackManager.Inst.CameraShake(CameraManager.Inst.OceanCamera.BaseShipCam, cameraShakePower, cameraShakeDuration);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/***********************************************************************
|
||||
* Methods
|
||||
***********************************************************************/
|
||||
#region Methods
|
||||
|
||||
private void HandleLaunchCannon()
|
||||
{
|
||||
if (!isLaunchMode) return;
|
||||
|
||||
var ray = CameraManager.Inst.MainCam.ScreenPointToRay(Input.mousePosition);
|
||||
|
||||
if (Physics.Raycast(ray, out var hit, mouseRayDistance, waterLayer, QueryTriggerInteraction.Collide))
|
||||
{
|
||||
var directionToMouse = (hit.point - transform.position).normalized;
|
||||
directionToMouse.y = 0f;
|
||||
|
||||
var lookRotation = Quaternion.LookRotation(directionToMouse);
|
||||
var cannonRotationDirection = Quaternion.Euler(0f, lookRotation.eulerAngles.y, 0f);
|
||||
|
||||
transform.rotation = cannonRotationDirection;
|
||||
}
|
||||
|
||||
if (!isCharging) return;
|
||||
|
||||
if (chargingGauge < 1f)
|
||||
{
|
||||
if (gaugeChargingTime == 0f)
|
||||
{
|
||||
gaugeChargingTime = 1f;
|
||||
}
|
||||
|
||||
chargingGauge += 1 / gaugeChargingTime * Time.deltaTime;
|
||||
chargingGauge = Mathf.Clamp(chargingGauge, 0f, 1f);
|
||||
}
|
||||
else
|
||||
{
|
||||
chargingGauge = 1f;
|
||||
}
|
||||
launchProcessBar.SetFillAmount(chargingGauge);
|
||||
|
||||
cannon.CalculateLaunchTrajectory(cannon.CalculateEndPosition(chargingGauge), true);
|
||||
}
|
||||
|
||||
private IEnumerator LaunchCoolDown(float waitTime)
|
||||
{
|
||||
var time = 0f;
|
||||
launchProcessBar.SetSliderValue(0f);
|
||||
launchProcessBar.SetActiveReloadSlider(true);
|
||||
|
||||
while (time <= waitTime)
|
||||
{
|
||||
time += Time.deltaTime;
|
||||
var sliderValue = time > 0 ? time / waitTime : 0f;
|
||||
launchProcessBar.SetSliderValue(sliderValue);
|
||||
yield return null;
|
||||
}
|
||||
|
||||
cannon.IsReloading = false;
|
||||
launchProcessBar.SetActiveReloadSlider(false);
|
||||
}
|
||||
|
||||
public void HitAction(RaycastHit hit, float power, GameObject marker = null)
|
||||
{
|
||||
if (hit.collider.gameObject.layer == LayerMask.NameToLayer("Water"))
|
||||
{
|
||||
var maxSize = Physics.OverlapSphereNonAlloc(hit.point, cannon.CannonRadius, hitColliders, boidsLayer,
|
||||
QueryTriggerInteraction.Collide);
|
||||
|
||||
for (var i = 0; i < maxSize; i++)
|
||||
{
|
||||
var hitBoids = hitColliders[i].GetComponentInParent<Boids>();
|
||||
var catchSize = Random.Range((int)randomCatch.x, (int)randomCatch.y + 1);
|
||||
hitBoids.CatchBoid(hitColliders[i], catchSize);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hit.transform.GetComponent<IDamageable>()?.TakeDamage(power);
|
||||
}
|
||||
|
||||
if (marker)
|
||||
{
|
||||
Destroy(marker);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
11
BlueWater/Assets/02.Scripts/Player/CannonController.cs.meta
Normal file
11
BlueWater/Assets/02.Scripts/Player/CannonController.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 18cbbf3c14017be4d990dd008561a7ea
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -5,7 +5,7 @@ using UnityEngine;
|
||||
namespace BlueWaterProject
|
||||
{
|
||||
[Serializable]
|
||||
public class WayPoint
|
||||
public class WayPointInfo
|
||||
{
|
||||
[field: SerializeField] public Vector3 Point { get; set; }
|
||||
[field: SerializeField] public float WaitTime { get; private set; }
|
139
BlueWater/Assets/05.Prefabs/Boids/VisualSmallFishBoids.prefab
Normal file
139
BlueWater/Assets/05.Prefabs/Boids/VisualSmallFishBoids.prefab
Normal file
@ -0,0 +1,139 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &2066924941115021418
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1800824703194841433, guid: f228040d76c9217409284544f353da47,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1800824703194841433, guid: f228040d76c9217409284544f353da47,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1800824703194841433, guid: f228040d76c9217409284544f353da47,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1800824703194841433, guid: f228040d76c9217409284544f353da47,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1800824703194841433, guid: f228040d76c9217409284544f353da47,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1800824703194841433, guid: f228040d76c9217409284544f353da47,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1800824703194841433, guid: f228040d76c9217409284544f353da47,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1800824703194841433, guid: f228040d76c9217409284544f353da47,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1800824703194841433, guid: f228040d76c9217409284544f353da47,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1800824703194841433, guid: f228040d76c9217409284544f353da47,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4541625270423798677, guid: f228040d76c9217409284544f353da47,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: VisualSmallFishBoids
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5146900491857106217, guid: f228040d76c9217409284544f353da47,
|
||||
type: 3}
|
||||
propertyPath: fishSpot
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5146900491857106217, guid: f228040d76c9217409284544f353da47,
|
||||
type: 3}
|
||||
propertyPath: boidCount
|
||||
value: 100
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5146900491857106217, guid: f228040d76c9217409284544f353da47,
|
||||
type: 3}
|
||||
propertyPath: boidPrefab
|
||||
value:
|
||||
objectReference: {fileID: 5402562142639805275, guid: c6911733874ec6645aa30548164bb1fb,
|
||||
type: 3}
|
||||
- target: {fileID: 5146900491857106217, guid: f228040d76c9217409284544f353da47,
|
||||
type: 3}
|
||||
propertyPath: showWaterEffect
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5146900491857106217, guid: f228040d76c9217409284544f353da47,
|
||||
type: 3}
|
||||
propertyPath: <CohesionWeight>k__BackingField
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5146900491857106217, guid: f228040d76c9217409284544f353da47,
|
||||
type: 3}
|
||||
propertyPath: <RandomSpeedRange>k__BackingField.x
|
||||
value: 5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5146900491857106217, guid: f228040d76c9217409284544f353da47,
|
||||
type: 3}
|
||||
propertyPath: <RandomSpeedRange>k__BackingField.y
|
||||
value: 5
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects:
|
||||
- {fileID: 2873048866372186192, guid: f228040d76c9217409284544f353da47, type: 3}
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents:
|
||||
- targetCorrespondingSourceObject: {fileID: 4541625270423798677, guid: f228040d76c9217409284544f353da47,
|
||||
type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 7313990944056702472}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: f228040d76c9217409284544f353da47, type: 3}
|
||||
--- !u!1 &2569349039409732607 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 4541625270423798677, guid: f228040d76c9217409284544f353da47,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 2066924941115021418}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!95 &7313990944056702472
|
||||
Animator:
|
||||
serializedVersion: 7
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2569349039409732607}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 0}
|
||||
m_Controller: {fileID: 0}
|
||||
m_CullingMode: 0
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 1
|
||||
m_LinearVelocityBlending: 0
|
||||
m_StabilizeFeet: 0
|
||||
m_AnimatePhysics: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorStateOnDisable: 0
|
||||
m_WriteDefaultValuesOnDisable: 0
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e40f36a1b30d2742a618dea061f5c09
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
11540
BlueWater/Assets/05.Prefabs/Characters/Enemies/PirateShip.prefab
Normal file
11540
BlueWater/Assets/05.Prefabs/Characters/Enemies/PirateShip.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4adfed8fb6a4aa64faf36d24332fb894
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -5471,7 +5471,7 @@ GameObject:
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 4294967295
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &8780450860930567142
|
||||
Transform:
|
||||
@ -10610,12 +10610,13 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 7773911348870221902}
|
||||
- component: {fileID: 5050991741956807937}
|
||||
- component: {fileID: 3589425228496357775}
|
||||
m_Layer: 0
|
||||
m_Name: Cannon
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 4294967295
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &7773911348870221902
|
||||
Transform:
|
||||
@ -10647,14 +10648,56 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 3e8c36fe9172849798f9c4fd87b77ec7, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
playerInput: {fileID: 8801751669966394771}
|
||||
projectileObject: {fileID: 128572, guid: 8d387b0f65dfa4cdc965c4b56216e120, type: 3}
|
||||
visualLook: {fileID: 8780450860930567142}
|
||||
launchTransform: {fileID: 8113728070962989305}
|
||||
predictedLine: {fileID: 5794552822649783368}
|
||||
hitMarker: {fileID: 5951017876843886146, guid: 0eef5d11a5bdac248b2d16d733fd357c,
|
||||
type: 3}
|
||||
directionIndicator: {fileID: 0}
|
||||
instantiateObjects: {fileID: 0}
|
||||
<LaunchCooldown>k__BackingField: 1
|
||||
damage: 20
|
||||
distanceCoefficient: 40
|
||||
launchType: 0
|
||||
launchSpeed: 40
|
||||
launchAngle: 20
|
||||
isUsingPredictLine: 1
|
||||
lineMaxPoint: 200
|
||||
lineInterval: 0.025
|
||||
rayDistance: 100
|
||||
hitLayer:
|
||||
serializedVersion: 2
|
||||
m_Bits: 2105368
|
||||
<IsReloading>k__BackingField: 0
|
||||
onHitAction:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 3589425228496357775}
|
||||
m_TargetAssemblyTypeName: BlueWaterProject.CannonController, Assembly-CSharp
|
||||
m_MethodName: HitAction
|
||||
m_Mode: 0
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!114 &3589425228496357775
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4610911148032566083}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 18cbbf3c14017be4d990dd008561a7ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
cannon: {fileID: 5050991741956807937}
|
||||
playerInput: {fileID: 8801751669966394771}
|
||||
launchProcessBar:
|
||||
<Obj>k__BackingField: {fileID: 0}
|
||||
<Fill>k__BackingField: {fileID: 0}
|
||||
@ -10662,22 +10705,9 @@ MonoBehaviour:
|
||||
<ReloadSlider>k__BackingField: {fileID: 0}
|
||||
<ShakeDuration>k__BackingField: 0
|
||||
<ShakePower>k__BackingField: 0
|
||||
instantiateObjects: {fileID: 0}
|
||||
gaugeChargingTime: 1
|
||||
launchCooldown: 1
|
||||
distanceCoefficient: 40
|
||||
launchType: 1
|
||||
launchSpeed: 40
|
||||
launchAngle: 10
|
||||
isUsingPredictLine: 1
|
||||
lineMaxPoint: 200
|
||||
lineInterval: 0.025
|
||||
randomCatch: {x: 1, y: 3}
|
||||
randomCatch: {x: 1, y: 4}
|
||||
mouseRayDistance: 500
|
||||
rayDistance: 100
|
||||
hitLayer:
|
||||
serializedVersion: 2
|
||||
m_Bits: 2105368
|
||||
waterLayer:
|
||||
serializedVersion: 2
|
||||
m_Bits: 16
|
||||
@ -10688,7 +10718,6 @@ MonoBehaviour:
|
||||
cameraShakeDuration: 0.3
|
||||
isLaunchMode: 0
|
||||
isCharging: 0
|
||||
isReloading: 0
|
||||
chargingGauge: 0
|
||||
previousGauge: 0
|
||||
--- !u!1 &5908813642164490040
|
||||
@ -11400,6 +11429,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
playerInput: {fileID: 8801751669966394771}
|
||||
rb: {fileID: 2658728570364772279}
|
||||
rayfireRigids: []
|
||||
maxSpeed: 20
|
||||
acceleration: 20
|
||||
deceleration: 10
|
||||
@ -11410,9 +11440,6 @@ MonoBehaviour:
|
||||
<MaxHp>k__BackingField: 100
|
||||
<CurrentHp>k__BackingField: 100
|
||||
<Strength>k__BackingField: 500
|
||||
waterLayer:
|
||||
serializedVersion: 2
|
||||
m_Bits: 16
|
||||
groundLayer:
|
||||
serializedVersion: 2
|
||||
m_Bits: 8
|
||||
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 28902a18b5f06654abac02f8f9a53abf
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 84835f1ca4160ed47a22f1512265676f
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5944ac182155d32418c7997e51850733
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e485d69bc3395ba499aca09bc0af31bb
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c1e7e6c1e57275346a7eee09bad71380
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d32a0931a497e444884aefe13d37eadd
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -13,7 +13,7 @@ GameObject:
|
||||
- component: {fileID: 5479992}
|
||||
- component: {fileID: 7590616447448401593}
|
||||
m_Layer: 25
|
||||
m_Name: GrenadeFireOBJ
|
||||
m_Name: PlayerGrenadeFireOBJ
|
||||
m_TagString: Missile
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@ -104,7 +104,7 @@ MonoBehaviour:
|
||||
- impactParticle: {fileID: 180702, guid: c77dffb15f639694ea8f1002f0c966cf, type: 3}
|
||||
layer:
|
||||
serializedVersion: 2
|
||||
m_Bits: 2105864
|
||||
m_Bits: 2105352
|
||||
projectileParticle: {fileID: 1258406917094090, guid: ee54236328d3fd94a89d479e38f9f112,
|
||||
type: 3}
|
||||
muzzleParticle: {fileID: 1509306094841910, guid: 7026fe0f1c7efa648b9b3c4662359062,
|
@ -28,44 +28,8 @@ AnimationClip:
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
- serializedVersion: 3
|
||||
time: 5.0333333
|
||||
value: {x: 23.6, y: 0, z: 24.6}
|
||||
inSlope: {x: 0, y: 0, z: 5.4328356}
|
||||
outSlope: {x: 0, y: 0, z: 5.4328356}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
- serializedVersion: 3
|
||||
time: 10.05
|
||||
value: {x: 23.6, y: 0, z: 54.6}
|
||||
inSlope: {x: 0, y: 0, z: 4.109453}
|
||||
outSlope: {x: 0, y: 0, z: 4.109453}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
- serializedVersion: 3
|
||||
time: 15.083333
|
||||
value: {x: 65.2, y: 0, z: 65.9}
|
||||
inSlope: {x: 6.8628106, y: 0, z: 0}
|
||||
outSlope: {x: 6.8628106, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
- serializedVersion: 3
|
||||
time: 20.133333
|
||||
value: {x: 92.8, y: 0, z: 37.7}
|
||||
inSlope: {x: 2.8211915, y: 0, z: -7.331126}
|
||||
outSlope: {x: 2.8211915, y: 0, z: -7.331126}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
- serializedVersion: 3
|
||||
time: 25.15
|
||||
value: {x: 99.9, y: 0, z: -7.9}
|
||||
time: 9.933333
|
||||
value: {x: 104.9, y: 0, z: 0}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
@ -73,7 +37,25 @@ AnimationClip:
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
- serializedVersion: 3
|
||||
time: 30.183332
|
||||
time: 29.816668
|
||||
value: {x: 99.6, y: 0, z: -149.2}
|
||||
inSlope: {x: -0.7110122, y: 0, z: 0}
|
||||
outSlope: {x: -0.7110122, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
- serializedVersion: 3
|
||||
time: 39.75
|
||||
value: {x: 0, y: 0, z: -139.9}
|
||||
inSlope: {x: 0, y: 0, z: 1.2338313}
|
||||
outSlope: {x: 0, y: 0, z: 1.2338313}
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||
- serializedVersion: 3
|
||||
time: 59.966667
|
||||
value: {x: 0, y: 0, z: 0}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
@ -84,7 +66,7 @@ AnimationClip:
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
path:
|
||||
path: Bounds
|
||||
m_ScaleCurves: []
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves: []
|
||||
@ -96,7 +78,7 @@ AnimationClip:
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- serializedVersion: 2
|
||||
path: 0
|
||||
path: 1040569081
|
||||
attribute: 1
|
||||
script: {fileID: 0}
|
||||
typeID: 4
|
||||
@ -110,7 +92,7 @@ AnimationClip:
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 30.183332
|
||||
m_StopTime: 59.966667
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
@ -140,8 +122,8 @@ AnimationClip:
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 5.0333333
|
||||
value: 23.6
|
||||
time: 9.933333
|
||||
value: 104.9
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
@ -149,8 +131,17 @@ AnimationClip:
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 10.05
|
||||
value: 23.6
|
||||
time: 29.816668
|
||||
value: 99.6
|
||||
inSlope: -0.7110122
|
||||
outSlope: -0.7110122
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 39.75
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
@ -158,34 +149,7 @@ AnimationClip:
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 15.083333
|
||||
value: 65.2
|
||||
inSlope: 6.8628106
|
||||
outSlope: 6.8628106
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 20.133333
|
||||
value: 92.8
|
||||
inSlope: 2.8211915
|
||||
outSlope: 2.8211915
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 25.15
|
||||
value: 99.9
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 30.183332
|
||||
time: 59.966667
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
@ -197,7 +161,7 @@ AnimationClip:
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.x
|
||||
path:
|
||||
path: Bounds
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
flags: 0
|
||||
@ -215,7 +179,7 @@ AnimationClip:
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 5.0333333
|
||||
time: 9.933333
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
@ -224,7 +188,7 @@ AnimationClip:
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 10.05
|
||||
time: 29.816668
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
@ -233,7 +197,7 @@ AnimationClip:
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 15.083333
|
||||
time: 39.75
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
@ -242,25 +206,7 @@ AnimationClip:
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 20.133333
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 25.15
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 30.183332
|
||||
time: 59.966667
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
@ -272,7 +218,7 @@ AnimationClip:
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.y
|
||||
path:
|
||||
path: Bounds
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
flags: 0
|
||||
@ -290,26 +236,8 @@ AnimationClip:
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 5.0333333
|
||||
value: 24.6
|
||||
inSlope: 5.4328356
|
||||
outSlope: 5.4328356
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 10.05
|
||||
value: 54.6
|
||||
inSlope: 4.109453
|
||||
outSlope: 4.109453
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 15.083333
|
||||
value: 65.9
|
||||
time: 9.933333
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
@ -317,17 +245,8 @@ AnimationClip:
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 20.133333
|
||||
value: 37.7
|
||||
inSlope: -7.331126
|
||||
outSlope: -7.331126
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 25.15
|
||||
value: -7.9
|
||||
time: 29.816668
|
||||
value: -149.2
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
@ -335,7 +254,16 @@ AnimationClip:
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 30.183332
|
||||
time: 39.75
|
||||
value: -139.9
|
||||
inSlope: 1.2338313
|
||||
outSlope: 1.2338313
|
||||
tangentMode: 136
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 59.966667
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
@ -347,11 +275,11 @@ AnimationClip:
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalPosition.z
|
||||
path:
|
||||
path: Bounds
|
||||
classID: 4
|
||||
script: {fileID: 0}
|
||||
flags: 0
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 1
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_Events: []
|
||||
|
@ -1,11 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e174a08d577359c44bd7930fac541c9f
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 99905
|
||||
packageName: Pirate Ships
|
||||
packageVersion: 1.3
|
||||
assetPath: Assets/Hand_Painted_Boats/Pirate_Ship_Pack/Models/Pirat_Boats_01.fbx
|
||||
uploadId: 608380
|
||||
ModelImporter:
|
||||
serializedVersion: 26
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
importMaterials: 0
|
||||
materialImportMode: 0
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
@ -14,9 +21,8 @@ ModelImporter:
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
@ -31,7 +37,7 @@ ModelImporter:
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
isReadable: 1
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
@ -39,26 +45,35 @@ ModelImporter:
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 0
|
||||
importBlendShapes: 0
|
||||
importCameras: 0
|
||||
importLights: 0
|
||||
nodeNameCollisionStrategy: 0
|
||||
fileIdsGeneration: 1
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 1
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 0
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
@ -69,7 +84,6 @@ ModelImporter:
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 0
|
||||
copyAvatar: 0
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
@ -87,16 +101,14 @@ ModelImporter:
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 0
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 0
|
||||
importBlendShapeDeformPercent: 0
|
||||
remapMaterialsIfMaterialImportModeIsNone: 1
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 99905
|
||||
packageName: Pirate Ships
|
||||
packageVersion: 1.3
|
||||
assetPath: Assets/Hand_Painted_Boats/Pirate_Ship_Pack/Models/Pirat_Boats_01.fbx
|
||||
uploadId: 608380
|
||||
|
Loading…
Reference in New Issue
Block a user