From 93849990477b856de5628bfa184426031b8fc9e7 Mon Sep 17 00:00:00 2001 From: M1_IDMhan Date: Thu, 31 Aug 2023 15:46:13 +0900 Subject: [PATCH] #11 Mouse cursor change --- BlueWater/Assets/01.Scenes/02.Main.unity | 197 +++++++++++----- .../Assets/02.Scripts/AssaultMode/Boat.cs | 142 ++++++------ .../02.Scripts/AssaultMode/DraggableCard.cs | 216 +++++++++--------- .../Assets/02.Scripts/CameraController.cs | 179 +++++++-------- .../Assets/02.Scripts/Data/CardDataSo.cs | 1 - BlueWater/Assets/02.Scripts/DataManager.cs | 126 +++++----- BlueWater/Assets/02.Scripts/GameManager.cs | 75 +++--- .../02.Scripts/Interface/IDameable23.cs | 7 + .../02.Scripts/Interface/IDameable23.cs.meta | 3 + BlueWater/Assets/02.Scripts/Player/Card.cs | 3 +- BlueWater/Assets/02.Scripts/Player/Player.cs | 11 +- BlueWater/Assets/02.Scripts/UiManager.cs | 111 ++++----- .../Assets/02.Scripts/Utility/GlobalValue.cs | 46 ++-- .../WaterAndFloater/Gerstner wave/Floater.cs | 72 +++--- .../Gerstner wave/GerstnerWave.cs | 94 ++++---- BlueWater/Assets/03.Images/Materials.meta | 8 - .../03.Images/Materials/cha_03_front.mat | 133 ----------- .../03.Images/Materials/cha_03_front.mat.meta | 8 - .../Assets/03.Images/icons8-cursor-96-2.png | Bin 0 -> 4195 bytes .../03.Images/icons8-cursor-96-2.png.meta | 124 ++++++++++ .../Assets/03.Images/icons8-cursor-96.png | Bin 0 -> 4146 bytes .../03.Images/icons8-cursor-96.png.meta | 124 ++++++++++ BlueWater/Assets/05.Prefabs/Boat.prefab | 2 +- .../Materials/CPT_Terrain_01.mat | 6 +- .../Terrain_Assets/Materials/Ice_01.mat | 6 +- 25 files changed, 959 insertions(+), 735 deletions(-) create mode 100644 BlueWater/Assets/02.Scripts/Interface/IDameable23.cs create mode 100644 BlueWater/Assets/02.Scripts/Interface/IDameable23.cs.meta delete mode 100644 BlueWater/Assets/03.Images/Materials.meta delete mode 100644 BlueWater/Assets/03.Images/Materials/cha_03_front.mat delete mode 100644 BlueWater/Assets/03.Images/Materials/cha_03_front.mat.meta create mode 100644 BlueWater/Assets/03.Images/icons8-cursor-96-2.png create mode 100644 BlueWater/Assets/03.Images/icons8-cursor-96-2.png.meta create mode 100644 BlueWater/Assets/03.Images/icons8-cursor-96.png create mode 100644 BlueWater/Assets/03.Images/icons8-cursor-96.png.meta diff --git a/BlueWater/Assets/01.Scenes/02.Main.unity b/BlueWater/Assets/01.Scenes/02.Main.unity index 270c971f6..20a465602 100644 --- a/BlueWater/Assets/01.Scenes/02.Main.unity +++ b/BlueWater/Assets/01.Scenes/02.Main.unity @@ -16961,7 +16961,7 @@ MonoBehaviour: - {fileID: 21300000, guid: d7aae5ed9e4924be4ac2fe09b2f729a9, type: 3} - {fileID: 21300000, guid: 9180a011ac08440f89deb0b7aa2820f2, type: 3} - {fileID: 21300000, guid: 9180a011ac08440f89deb0b7aa2820f2, type: 3} - cursorTexture: {fileID: 2800000, guid: c617a5b08493842c3833527a458fd612, type: 3} + cursorTexture: {fileID: 2800000, guid: 3a146044a282641d99ba04c33b8c2bbf, type: 3} --- !u!4 &107190135 Transform: m_ObjectHideFlags: 0 @@ -34764,6 +34764,87 @@ Transform: - {fileID: 847870679} m_Father: {fileID: 106415425} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &222471351 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 155222, guid: 3ed5d7842716c504d8dd3ea20c75a637, type: 3} + propertyPath: m_Name + value: Toon Queen Worm - Pink (1) + objectReference: {fileID: 0} + - target: {fileID: 452206, guid: 3ed5d7842716c504d8dd3ea20c75a637, type: 3} + propertyPath: m_LocalScale.x + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 452206, guid: 3ed5d7842716c504d8dd3ea20c75a637, type: 3} + propertyPath: m_LocalScale.y + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 452206, guid: 3ed5d7842716c504d8dd3ea20c75a637, type: 3} + propertyPath: m_LocalScale.z + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 452206, guid: 3ed5d7842716c504d8dd3ea20c75a637, type: 3} + propertyPath: m_LocalPosition.x + value: -71.3 + objectReference: {fileID: 0} + - target: {fileID: 452206, guid: 3ed5d7842716c504d8dd3ea20c75a637, type: 3} + propertyPath: m_LocalPosition.y + value: -13.5 + objectReference: {fileID: 0} + - target: {fileID: 452206, guid: 3ed5d7842716c504d8dd3ea20c75a637, type: 3} + propertyPath: m_LocalPosition.z + value: -1.3 + objectReference: {fileID: 0} + - target: {fileID: 452206, guid: 3ed5d7842716c504d8dd3ea20c75a637, type: 3} + propertyPath: m_LocalRotation.w + value: -0.6878803 + objectReference: {fileID: 0} + - target: {fileID: 452206, guid: 3ed5d7842716c504d8dd3ea20c75a637, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 452206, guid: 3ed5d7842716c504d8dd3ea20c75a637, type: 3} + propertyPath: m_LocalRotation.y + value: -0.7258242 + objectReference: {fileID: 0} + - target: {fileID: 452206, guid: 3ed5d7842716c504d8dd3ea20c75a637, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 452206, guid: 3ed5d7842716c504d8dd3ea20c75a637, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 452206, guid: 3ed5d7842716c504d8dd3ea20c75a637, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -266.925 + objectReference: {fileID: 0} + - target: {fileID: 452206, guid: 3ed5d7842716c504d8dd3ea20c75a637, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 452206, guid: 3ed5d7842716c504d8dd3ea20c75a637, type: 3} + propertyPath: m_ConstrainProportionsScale + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 155222, guid: 3ed5d7842716c504d8dd3ea20c75a637, + type: 3} + insertIndex: -1 + addedObject: {fileID: 451666486} + - targetCorrespondingSourceObject: {fileID: 155222, guid: 3ed5d7842716c504d8dd3ea20c75a637, + type: 3} + insertIndex: -1 + addedObject: {fileID: 451666485} + m_SourcePrefab: {fileID: 100100000, guid: 3ed5d7842716c504d8dd3ea20c75a637, type: 3} --- !u!1 &222537145 GameObject: m_ObjectHideFlags: 0 @@ -70795,6 +70876,62 @@ SkinnedMeshRenderer: m_Center: {x: -0.06254879, y: 0.024880677, z: 0.00000011920929} m_Extent: {x: 0.5167997, y: 0.27444458, z: 0.7707152} m_DirtyAABB: 0 +--- !u!1 &451666484 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 155222, guid: 3ed5d7842716c504d8dd3ea20c75a637, + type: 3} + m_PrefabInstance: {fileID: 222471351} + m_PrefabAsset: {fileID: 0} +--- !u!54 &451666485 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 451666484} + serializedVersion: 4 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_CenterOfMass: {x: 0, y: 0, z: 0} + m_InertiaTensor: {x: 1, y: 1, z: 1} + m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ImplicitCom: 1 + m_ImplicitTensor: 1 + m_UseGravity: 0 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!136 &451666486 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 451666484} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 1 + m_Height: 4 + m_Direction: 1 + m_Center: {x: 0, y: 1.9, z: 0} --- !u!1 &451981707 GameObject: m_ObjectHideFlags: 0 @@ -74235,8 +74372,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 176cfac66084d4bfb9b4c9f11c4b137f, type: 3} m_Name: m_EditorClassIdentifier: - maxSpeed: 5 - acceleration: 2 + maxSpeed: 10 + acceleration: 4 deceleration: 2 turnSpeed: 1 characterSpeed: 2 @@ -86739,7 +86876,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!1 &550717941 GameObject: m_ObjectHideFlags: 0 @@ -182771,7 +182908,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 452206, guid: 3ed5d7842716c504d8dd3ea20c75a637, type: 3} propertyPath: m_LocalPosition.x - value: -7.3424807 + value: -1.9 objectReference: {fileID: 0} - target: {fileID: 452206, guid: 3ed5d7842716c504d8dd3ea20c75a637, type: 3} propertyPath: m_LocalPosition.y @@ -182779,7 +182916,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 452206, guid: 3ed5d7842716c504d8dd3ea20c75a637, type: 3} propertyPath: m_LocalPosition.z - value: 15.353005 + value: 15.7 objectReference: {fileID: 0} - target: {fileID: 452206, guid: 3ed5d7842716c504d8dd3ea20c75a637, type: 3} propertyPath: m_LocalRotation.w @@ -190839,50 +190976,6 @@ SkinnedMeshRenderer: m_Center: {x: -0.06498811, y: 0.020641163, z: 0.00000014901161} m_Extent: {x: 0.5143604, y: 0.28673673, z: 0.7707151} m_DirtyAABB: 0 ---- !u!1 &1234264506 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1234264508} - - component: {fileID: 1234264507} - m_Layer: 0 - m_Name: InputSystem - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1234264507 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1234264506} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 977b3558370da85488b8199c446577a0, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!4 &1234264508 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1234264506} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -187.1454, y: 12.477399, z: -121.38537} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1234566403 GameObject: m_ObjectHideFlags: 0 @@ -244929,7 +245022,7 @@ MonoBehaviour: IsHidden: 0 - Type: 0 Name: - GameObject: {fileID: 1234264506} + GameObject: {fileID: 0} Ordinal: 4 Priority: 0 IconType: 1000 @@ -338576,7 +338669,6 @@ SceneRoots: - {fileID: 1540310984} - {fileID: 1228753929} - {fileID: 107190135} - - {fileID: 1234264508} - {fileID: 2105062291} - {fileID: 1560348101} - {fileID: 476261175} @@ -338587,6 +338679,7 @@ SceneRoots: - {fileID: 1545641374} - {fileID: 1188875250} - {fileID: 1178452038} + - {fileID: 222471351} - {fileID: 1994033914} - {fileID: 342641572} - {fileID: 99817019} diff --git a/BlueWater/Assets/02.Scripts/AssaultMode/Boat.cs b/BlueWater/Assets/02.Scripts/AssaultMode/Boat.cs index 92f736ae7..34f8fa31d 100644 --- a/BlueWater/Assets/02.Scripts/AssaultMode/Boat.cs +++ b/BlueWater/Assets/02.Scripts/AssaultMode/Boat.cs @@ -1,89 +1,91 @@ -using System; using System.Collections; using System.Collections.Generic; using BlueWaterProject; using UnityEngine; using UnityEngine.AI; using UnityEngine.Animations; -using UnityEngine.UI; -public class Boat : MonoBehaviour +// ReSharper disable once CheckNamespace +namespace BlueWaterProject { - private NavMeshAgent agent; - private LineRenderer lineRenderer; - private GameObject spot; //도착지점 표시 이미지 - private Coroutine draw; //경로 그리기 코루틴 - - private Transform typeCard; - public SpriteRenderer TypeCardSprite { get; private set; } - private LookAtConstraint typeCardLookAtConstraint; - - public Vector3 Target { get; set; } - public string CardIndex { get; set; } - - public delegate void LandedEventHandler(string cardIndex, AttackerType attackerType, Vector3 assignPos); - public event LandedEventHandler OnLanded; - - private void Awake() + public class Boat : MonoBehaviour { - agent = GetComponent(); - lineRenderer = GetComponent(); - lineRenderer.startWidth = 0.1f; - lineRenderer.endWidth = 0.1f; - lineRenderer.material.color = Color.yellow; - lineRenderer.enabled = false; + private NavMeshAgent agent; + private LineRenderer lineRenderer; + private GameObject spot; //도착지점 표시 이미지 + private Coroutine draw; //경로 그리기 코루틴 + + private Transform typeCard; + public SpriteRenderer TypeCardSprite { get; private set; } + private LookAtConstraint typeCardLookAtConstraint; + + public Vector3 Target { get; set; } + public string CardIndex { get; set; } + + public delegate void LandedEventHandler(string cardIndex, AttackerType attackerType, Vector3 assignPos); + public event LandedEventHandler OnLanded; + + private void Awake() + { + agent = GetComponent(); + lineRenderer = GetComponent(); + lineRenderer.startWidth = 0.1f; + lineRenderer.endWidth = 0.1f; + lineRenderer.material.color = Color.yellow; + lineRenderer.enabled = false; - spot = Instantiate(DataManager.Inst.mouseSpot); - typeCard = transform.Find("TypeCard"); - TypeCardSprite = typeCard.GetComponent(); - typeCardLookAtConstraint = typeCard.GetComponent(); - } + spot = Instantiate(DataManager.Inst.mouseSpot); + typeCard = transform.Find("TypeCard"); + TypeCardSprite = typeCard.GetComponent(); + typeCardLookAtConstraint = typeCard.GetComponent(); + } - private void Start() - { - agent.SetDestination(Target); - - spot.gameObject.SetActive(true); - spot.transform.position = Target; - - if (draw != null) StopCoroutine(draw); - draw = StartCoroutine(DrawPath()); - - typeCardLookAtConstraint.SetSources(new List + private void Start() { - new ConstraintSource + agent.SetDestination(Target); + + spot.gameObject.SetActive(true); + spot.transform.position = Target; + + if (draw != null) StopCoroutine(draw); + draw = StartCoroutine(DrawPath()); + + typeCardLookAtConstraint.SetSources(new List { - sourceTransform = Camera.main.transform, - weight = 1 - } - }); - } + new ConstraintSource + { + sourceTransform = Camera.main.transform, + weight = 1 + } + }); + } - private void Update() - { - if (!(agent.remainingDistance < 0.1f && !agent.pathPending)) return; - spot.gameObject.SetActive(false); - - lineRenderer.enabled = false; - if (draw != null) StopCoroutine(draw); - - OnLanded?.Invoke(CardIndex, AttackerType.OFFENSE, Target); - Destroy(gameObject); - } - - private IEnumerator DrawPath() - { - lineRenderer.enabled = true; - yield return null; - while (true) + private void Update() { - var count = agent.path.corners.Length; - lineRenderer.positionCount = count; - for (var i = 0; i < count; i++) - { - lineRenderer.SetPosition(i, agent.path.corners[i] + new Vector3(0,1,0)); - } + if (!(agent.remainingDistance < 0.1f && !agent.pathPending)) return; + spot.gameObject.SetActive(false); + + lineRenderer.enabled = false; + if (draw != null) StopCoroutine(draw); + + OnLanded?.Invoke(CardIndex, AttackerType.OFFENSE, Target); + Destroy(gameObject); + } + + private IEnumerator DrawPath() + { + lineRenderer.enabled = true; yield return null; + while (true) + { + var count = agent.path.corners.Length; + lineRenderer.positionCount = count; + for (var i = 0; i < count; i++) + { + lineRenderer.SetPosition(i, agent.path.corners[i] + new Vector3(0,1,0)); + } + yield return null; + } } } } \ No newline at end of file diff --git a/BlueWater/Assets/02.Scripts/AssaultMode/DraggableCard.cs b/BlueWater/Assets/02.Scripts/AssaultMode/DraggableCard.cs index 8b87f1960..d3c0f65b3 100644 --- a/BlueWater/Assets/02.Scripts/AssaultMode/DraggableCard.cs +++ b/BlueWater/Assets/02.Scripts/AssaultMode/DraggableCard.cs @@ -1,136 +1,138 @@ -using System; using System.Collections; -using _02.Scripts.WaterAndShip; using BlueWaterProject; using Sirenix.OdinInspector; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; -public class DraggableCard : MonoBehaviour, IPointerDownHandler, IDragHandler, IPointerUpHandler +// ReSharper disable once CheckNamespace +namespace BlueWaterProject { - [Title("Card")] - private Vector3 originalPosition; - private Vector3 originalScale; - private CanvasGroup canvasGroup; - private GameObject border; - public Card card; + public class DraggableCard : MonoBehaviour, IPointerDownHandler, IDragHandler, IPointerUpHandler + { + [Title("Card")] + private Vector3 originalPosition; + private Vector3 originalScale; + private CanvasGroup canvasGroup; + private GameObject border; + public Card card; - [Title("Child Object")] - private Image typeImage; + [Title("Child Object")] + private Image typeImage; - [InfoBox("카드가 작아지는 속도 입니다. 높을수록 천천히 작아집니다.")] [Range(0f, 1000f)] - public float maxDistance = 500f; + [InfoBox("카드가 작아지는 속도 입니다. 높을수록 천천히 작아집니다.")] [Range(0f, 1000f)] + public float maxDistance = 500f; - private Coroutine scaleDown; + private Coroutine scaleDown; - private void Awake() - { - border = transform.Find("Border").gameObject; - typeImage = transform.Find("Type").GetComponent(); - } - - private void Start() - { - canvasGroup = GetComponent(); - } - - public void CardInit() - { - var cardInfo = DataManager.Inst.GetUnitDictionaryKey(card.UnitIdx); - typeImage.sprite = DataManager.Inst.cardType[(int)cardInfo.UnitType]; - } - - public void OnPointerDown(PointerEventData eventData) - { - var transform1 = transform; - originalPosition = transform1.position; - originalScale = transform1.localScale; - canvasGroup.alpha = 0.5f; - //transform1.localScale = new Vector3(0.3f, 0.3f, 1f); - if (scaleDown != null) StopCoroutine(scaleDown); - scaleDown = StartCoroutine(ScaleDown()); - } - - public void OnDrag(PointerEventData eventData) - { - transform.position = Input.mousePosition; - var ray = Camera.main.ScreenPointToRay(Input.mousePosition); - RaycastHit hit; - if (Physics.Raycast(ray, out hit) && hit.collider.CompareTag("Ground")) + private void Awake() { - // 마우스가 Ground 위에 있을 때 - border.SetActive(true); - } - else - { - // 마우스가 Ground 위에 없을 때 - border.SetActive(false); - } - } - - public void OnPointerUp(PointerEventData eventData) - { - // 지형에 올바르게 드롭되지 않으면 - if (IsDroppedOnTarget()) return; - if (scaleDown != null) - { - StopCoroutine(scaleDown); - scaleDown = null; + border = transform.Find("Border").gameObject; + typeImage = transform.Find("Type").GetComponent(); } - var transform1 = transform; - transform1.position = originalPosition; - transform1.localScale = originalScale; - canvasGroup.alpha = 1; - } + private void Start() + { + canvasGroup = GetComponent(); + } - private bool IsDroppedOnTarget() - { - var ray = Camera.main.ScreenPointToRay(Input.mousePosition); - RaycastHit hit; + public void CardInit() + { + var cardInfo = DataManager.Inst.GetUnitDictionaryKey(card.UnitIdx); + typeImage.sprite = DataManager.Inst.cardType[(int)cardInfo.UnitType]; + } - if (!Physics.Raycast(ray, out hit)) return false; - if (!hit.collider.CompareTag("Ground")) return false; - Destroy(gameObject); - var obj = Instantiate(DataManager.Inst.boat, GameManager.Inst.player.transform.position, - Quaternion.identity); + public void OnPointerDown(PointerEventData eventData) + { + var transform1 = transform; + originalPosition = transform1.position; + originalScale = transform1.localScale; + canvasGroup.alpha = 0.5f; + //transform1.localScale = new Vector3(0.3f, 0.3f, 1f); + if (scaleDown != null) StopCoroutine(scaleDown); + scaleDown = StartCoroutine(ScaleDown()); + } + + public void OnDrag(PointerEventData eventData) + { + transform.position = Input.mousePosition; + var ray = Camera.main.ScreenPointToRay(Input.mousePosition); + RaycastHit hit; + if (Physics.Raycast(ray, out hit) && hit.collider.CompareTag("Ground")) + { + // 마우스가 Ground 위에 있을 때 + border.SetActive(true); + } + else + { + // 마우스가 Ground 위에 없을 때 + border.SetActive(false); + } + } + + public void OnPointerUp(PointerEventData eventData) + { + // 지형에 올바르게 드롭되지 않으면 + if (IsDroppedOnTarget()) return; + if (scaleDown != null) + { + StopCoroutine(scaleDown); + scaleDown = null; + } + + var transform1 = transform; + transform1.position = originalPosition; + transform1.localScale = originalScale; + canvasGroup.alpha = 1; + } + + private bool IsDroppedOnTarget() + { + var ray = Camera.main.ScreenPointToRay(Input.mousePosition); + RaycastHit hit; + + if (!Physics.Raycast(ray, out hit)) return false; + if (!hit.collider.CompareTag("Ground")) return false; + Destroy(gameObject); + var obj = Instantiate(DataManager.Inst.boat, GameManager.Inst.player.transform.position, + Quaternion.identity); - var boat = obj.GetComponent(); - boat.TypeCardSprite.sprite = typeImage.sprite; - boat.Target = hit.point; - boat.CardIndex = card.Idx; - boat.OnLanded += UnitManager.Inst.CreateAndAssign; + var boat = obj.GetComponent(); + boat.TypeCardSprite.sprite = typeImage.sprite; + boat.Target = hit.point; + boat.CardIndex = card.Idx; + boat.OnLanded += UnitManager.Inst.CreateAndAssign; - return true; + return true; - } + } - private IEnumerator ScaleDown() - { - var originalScale = transform.localScale; - var targetScale = new Vector3(0.3f, 0.3f, 1f); - - while (true) + private IEnumerator ScaleDown() { - // 현재 위치와 원래 위치 사이의 거리를 계산 - var distance = Vector3.Distance(originalPosition, transform.position); + var originalScale = transform.localScale; + var targetScale = new Vector3(0.3f, 0.3f, 1f); - // 비율을 계산 (0 = 같은 위치, 1 = maxDistance만큼나 이상 떨어져 있음) - var ratio = Mathf.Min(distance / maxDistance, 1f); + while (true) + { + // 현재 위치와 원래 위치 사이의 거리를 계산 + var distance = Vector3.Distance(originalPosition, transform.position); - // SmoothStep 사용하면, 천천히 시작해서 점차 빠르게 변화 - // float의 경우만 사용할 수 있으므로, Vector3의 모든 요소에 일일이 적용 - var newScale = new Vector3( - Mathf.SmoothStep(originalScale.x, targetScale.x, ratio), - Mathf.SmoothStep(originalScale.y, targetScale.y, ratio), - Mathf.SmoothStep(originalScale.z, targetScale.z, ratio) - ); + // 비율을 계산 (0 = 같은 위치, 1 = maxDistance만큼나 이상 떨어져 있음) + var ratio = Mathf.Min(distance / maxDistance, 1f); - // 조정한 스케일을 적용 - transform.localScale = newScale; + // SmoothStep 사용하면, 천천히 시작해서 점차 빠르게 변화 + // float의 경우만 사용할 수 있으므로, Vector3의 모든 요소에 일일이 적용 + var newScale = new Vector3( + Mathf.SmoothStep(originalScale.x, targetScale.x, ratio), + Mathf.SmoothStep(originalScale.y, targetScale.y, ratio), + Mathf.SmoothStep(originalScale.z, targetScale.z, ratio) + ); - yield return null; + // 조정한 스케일을 적용 + transform.localScale = newScale; + + yield return null; + } } } } \ No newline at end of file diff --git a/BlueWater/Assets/02.Scripts/CameraController.cs b/BlueWater/Assets/02.Scripts/CameraController.cs index 3576b8623..631c7e399 100644 --- a/BlueWater/Assets/02.Scripts/CameraController.cs +++ b/BlueWater/Assets/02.Scripts/CameraController.cs @@ -1,105 +1,106 @@ -using System; -using System.Collections; -using System.Collections.Generic; using Cinemachine; using Sirenix.OdinInspector; using UnityEngine; using UnityEngine.InputSystem; -public class CameraController : MonoBehaviour +// ReSharper disable once CheckNamespace +namespace BlueWaterProject { - [Title("Dredge Cam")] - [Required("드렛지 카메라를 넣어주세요.")] - public CinemachineVirtualCamera dredgeCam; - private CinemachineOrbitalTransposer dredgeCamOrbitalTransposer; - [Range(0,1000)] - public int rotateSpeed = 10; - - [Required("습격모드 카메라를 넣어주세요.")] - public CinemachineVirtualCamera assaultCam; - - [Required("보트내부 카메라를 넣어주세요.")] - public CinemachineVirtualCamera InShipCam; - - [Required("조준 카메라를 넣어주세요.")] - public CinemachineFreeLook takeAimCam; - - public float sensitivity = 0.01f; - - [MinMaxSlider(2, 50, true)] - public Vector2 heightLimits = new Vector2(2, 50); - - private void Start() + public class CameraController : MonoBehaviour { - dredgeCamOrbitalTransposer = dredgeCam.GetCinemachineComponent(); - } - - private void Update() - { - TakeCamMovement(); - DredgeCamRotate(); - } - - public void CamAssaultMode() - { - assaultCam.Priority = 1; - dredgeCam.Priority = 0; - InShipCam.Priority = 0; - } + [Title("Dredge Cam")] + [Required("드렛지 카메라를 넣어주세요.")] + public CinemachineVirtualCamera dredgeCam; + private CinemachineOrbitalTransposer dredgeCamOrbitalTransposer; + [Range(0,1000)] + public int rotateSpeed = 10; - public void CamDredgeMode() - { - dredgeCam.Priority = 1; - assaultCam.Priority = 0; - InShipCam.Priority = 0; - } + [Required("습격모드 카메라를 넣어주세요.")] + public CinemachineVirtualCamera assaultCam; - public void CamInShipMode() - { - InShipCam.Priority = 1; - dredgeCam.Priority = 0; - assaultCam.Priority = 0; - } - - private void TakeCamMovement() - { - Vector2 mouseDelta = Mouse.current.delta.ReadValue(); - - Vector3 newPosition = takeAimCam.transform.position; - newPosition.y += mouseDelta.y * sensitivity; - newPosition.y = Mathf.Clamp(newPosition.y, heightLimits.x, heightLimits.y); - newPosition.x = GameManager.Inst.player.transform.position.x; - newPosition.z = GameManager.Inst.player.transform.position.z; - takeAimCam.transform.position = newPosition; - - - // Rotate around Y axis (Up direction) - takeAimCam.transform.RotateAround(takeAimCam.transform.position, Vector3.up, mouseDelta.x * sensitivity); - } - - public void CamTakeAim(bool isTakeAim) - { - takeAimCam.Priority = isTakeAim ? 2 : 0; - float yRotation = dredgeCam.transform.rotation.eulerAngles.y; - takeAimCam.transform.rotation = - Quaternion.Euler(takeAimCam.transform.rotation.eulerAngles.x, yRotation, takeAimCam.transform.rotation.eulerAngles.z); - } + [Required("보트내부 카메라를 넣어주세요.")] + public CinemachineVirtualCamera InShipCam; - public void DredgeCamRotate() - { - if (Input.GetMouseButtonDown(1)) + [Required("조준 카메라를 넣어주세요.")] + public CinemachineFreeLook takeAimCam; + + public float sensitivity = 0.01f; + + [MinMaxSlider(2, 50, true)] + public Vector2 heightLimits = new Vector2(2, 50); + + private void Start() { - //dredgeCam의 X Axis의 Speed를 변경 - dredgeCamOrbitalTransposer.m_XAxis.m_MaxSpeed = rotateSpeed; - dredgeCamOrbitalTransposer.m_XAxis.m_InputAxisName = "Mouse X"; - dredgeCamOrbitalTransposer.m_RecenterToTargetHeading.m_enabled = false; + dredgeCamOrbitalTransposer = dredgeCam.GetCinemachineComponent(); } - else if (Input.GetMouseButtonUp(1)) + + private void Update() { - //dredgeCam의 X Axis의 Speed를 원래대로 - dredgeCamOrbitalTransposer.m_XAxis.m_MaxSpeed = 0; - dredgeCamOrbitalTransposer.m_XAxis.m_InputAxisName = ""; - dredgeCamOrbitalTransposer.m_RecenterToTargetHeading.m_enabled = true; + TakeCamMovement(); + DredgeCamRotate(); + } + + public void CamAssaultMode() + { + assaultCam.Priority = 1; + dredgeCam.Priority = 0; + InShipCam.Priority = 0; + } + + public void CamDredgeMode() + { + dredgeCam.Priority = 1; + assaultCam.Priority = 0; + InShipCam.Priority = 0; + } + + public void CamInShipMode() + { + InShipCam.Priority = 1; + dredgeCam.Priority = 0; + assaultCam.Priority = 0; + } + + private void TakeCamMovement() + { + Vector2 mouseDelta = Mouse.current.delta.ReadValue(); + + Vector3 newPosition = takeAimCam.transform.position; + newPosition.y += mouseDelta.y * sensitivity; + newPosition.y = Mathf.Clamp(newPosition.y, heightLimits.x, heightLimits.y); + newPosition.x = GameManager.Inst.player.transform.position.x; + newPosition.z = GameManager.Inst.player.transform.position.z; + takeAimCam.transform.position = newPosition; + + + // Rotate around Y axis (Up direction) + takeAimCam.transform.RotateAround(takeAimCam.transform.position, Vector3.up, mouseDelta.x * sensitivity); + } + + public void CamTakeAim(bool isTakeAim) + { + takeAimCam.Priority = isTakeAim ? 2 : 0; + float yRotation = dredgeCam.transform.rotation.eulerAngles.y; + takeAimCam.transform.rotation = + Quaternion.Euler(takeAimCam.transform.rotation.eulerAngles.x, yRotation, takeAimCam.transform.rotation.eulerAngles.z); + } + + public void DredgeCamRotate() + { + if (Input.GetMouseButtonDown(1)) + { + //dredgeCam의 X Axis의 Speed를 변경 + dredgeCamOrbitalTransposer.m_XAxis.m_MaxSpeed = rotateSpeed; + dredgeCamOrbitalTransposer.m_XAxis.m_InputAxisName = "Mouse X"; + dredgeCamOrbitalTransposer.m_RecenterToTargetHeading.m_enabled = false; + } + else if (Input.GetMouseButtonUp(1)) + { + //dredgeCam의 X Axis의 Speed를 원래대로 + dredgeCamOrbitalTransposer.m_XAxis.m_MaxSpeed = 0; + dredgeCamOrbitalTransposer.m_XAxis.m_InputAxisName = ""; + dredgeCamOrbitalTransposer.m_RecenterToTargetHeading.m_enabled = true; + } } } } \ No newline at end of file diff --git a/BlueWater/Assets/02.Scripts/Data/CardDataSo.cs b/BlueWater/Assets/02.Scripts/Data/CardDataSo.cs index f68d099b3..55e9f8698 100644 --- a/BlueWater/Assets/02.Scripts/Data/CardDataSo.cs +++ b/BlueWater/Assets/02.Scripts/Data/CardDataSo.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using _02.Scripts.WaterAndShip; using UnityEngine; // ReSharper disable once CheckNamespace diff --git a/BlueWater/Assets/02.Scripts/DataManager.cs b/BlueWater/Assets/02.Scripts/DataManager.cs index 1f850d530..a17ed76cb 100644 --- a/BlueWater/Assets/02.Scripts/DataManager.cs +++ b/BlueWater/Assets/02.Scripts/DataManager.cs @@ -1,77 +1,79 @@ using System.Collections.Generic; -using _02.Scripts.WaterAndShip; -using BlueWaterProject; using Sirenix.OdinInspector; using UnityEngine; -public class DataManager : Singleton +// ReSharper disable once CheckNamespace +namespace BlueWaterProject { - [field: Title("Scriptable Object")] - [field: SerializeField] public AiViewDataSo AiViewDataSo { get; private set; } - private Dictionary aiViewDictionary; - - [field: SerializeField] public AiStatDataSo AiStatDataSo { get; private set; } - private Dictionary aiStatDictionary; - - [field: SerializeField] public UnitDataSo UnitDataSo { get; private set; } - private Dictionary unitDictionary; - - [field: SerializeField] public UnitDataSo EnemyUnitDataSo { get; private set; } - private Dictionary enemyUnitDictionary; - - [field: SerializeField] public CardDataSo CardDataSo { get; private set; } - private Dictionary cardDictionary; - - [field: Title("DataBase")] - [field: SerializeField] public List CardList { get; private set; } = new(GlobalValue.CARD_DATA_CAPACITY); - - [Title("DataBase", "GameObject")] - public GameObject mouseSpot; - public GameObject boat; - public GameObject assaultCard; - - [Title("DataBase", "Sprites")] - public Sprite[] cardType; - public Texture2D cursorTexture; - - protected override void OnAwake() + public class DataManager : Singleton { - InitDictionary(); - } - - private void InitDictionary() - { - aiViewDictionary = CreateDictionaryFromList(AiViewDataSo.aiViewDataList, GlobalValue.AI_VIEW_DATA_CAPACITY); - aiStatDictionary = CreateDictionaryFromList(AiStatDataSo.aiStatDataList, GlobalValue.AI_STAT_DATA_CAPACITY); - unitDictionary = CreateDictionaryFromList(UnitDataSo.unitDataList, GlobalValue.UNIT_DATA_CAPACITY); - cardDictionary = CreateDictionaryFromList(CardDataSo.cardDataList, GlobalValue.CARD_DATA_CAPACITY); - } + [field: Title("Scriptable Object")] + [field: SerializeField] public AiViewDataSo AiViewDataSo { get; private set; } + private Dictionary aiViewDictionary; - /// - /// Dictionary 초기화 함수 - /// - private Dictionary CreateDictionaryFromList(List list, int capacity) where T : IIdx - { - var newDictionary = new Dictionary(capacity); - - foreach (var item in list) + [field: SerializeField] public AiStatDataSo AiStatDataSo { get; private set; } + private Dictionary aiStatDictionary; + + [field: SerializeField] public UnitDataSo UnitDataSo { get; private set; } + private Dictionary unitDictionary; + + [field: SerializeField] public UnitDataSo EnemyUnitDataSo { get; private set; } + private Dictionary enemyUnitDictionary; + + [field: SerializeField] public CardDataSo CardDataSo { get; private set; } + private Dictionary cardDictionary; + + [field: Title("DataBase")] + [field: SerializeField] public List CardList { get; private set; } = new(GlobalValue.CARD_DATA_CAPACITY); + + [Title("DataBase", "GameObject")] + public GameObject mouseSpot; + public GameObject boat; + public GameObject assaultCard; + + [Title("DataBase", "Sprites")] + public Sprite[] cardType; + public Texture2D cursorTexture; + + protected override void OnAwake() { - newDictionary.Add(item.Idx, item); + InitDictionary(); } - return newDictionary; - } + private void InitDictionary() + { + aiViewDictionary = CreateDictionaryFromList(AiViewDataSo.aiViewDataList, GlobalValue.AI_VIEW_DATA_CAPACITY); + aiStatDictionary = CreateDictionaryFromList(AiStatDataSo.aiStatDataList, GlobalValue.AI_STAT_DATA_CAPACITY); + unitDictionary = CreateDictionaryFromList(UnitDataSo.unitDataList, GlobalValue.UNIT_DATA_CAPACITY); + cardDictionary = CreateDictionaryFromList(CardDataSo.cardDataList, GlobalValue.CARD_DATA_CAPACITY); + } - public AiView GetAiViewDictionaryKey(string idx) => aiViewDictionary[idx] != null ? aiViewDictionary[idx] : null; - public AiStat GetAiStatDictionaryKey(string idx) => aiStatDictionary[idx] != null ? aiStatDictionary[idx] : null; - public Unit GetUnitDictionaryKey(string idx) => unitDictionary[idx] != null ? unitDictionary[idx] : null; - public Unit GetEnemyUnitDictionaryKey(string idx) => enemyUnitDictionary[idx] != null ? enemyUnitDictionary[idx] : null; - public Card GetCardDictionaryFromKey(string idx) => cardDictionary[idx] != null ? cardDictionary[idx] : null; + /// + /// Dictionary 초기화 함수 + /// + private Dictionary CreateDictionaryFromList(List list, int capacity) where T : IIdx + { + var newDictionary = new Dictionary(capacity); + + foreach (var item in list) + { + newDictionary.Add(item.Idx, item); + } + + return newDictionary; + } + + public AiView GetAiViewDictionaryKey(string idx) => aiViewDictionary[idx] != null ? aiViewDictionary[idx] : null; + public AiStat GetAiStatDictionaryKey(string idx) => aiStatDictionary[idx] != null ? aiStatDictionary[idx] : null; + public Unit GetUnitDictionaryKey(string idx) => unitDictionary[idx] != null ? unitDictionary[idx] : null; + public Unit GetEnemyUnitDictionaryKey(string idx) => enemyUnitDictionary[idx] != null ? enemyUnitDictionary[idx] : null; + public Card GetCardDictionaryFromKey(string idx) => cardDictionary[idx] != null ? cardDictionary[idx] : null; #if UNITY_EDITOR - public AiView GetAiViewSoKey(string idx) => AiViewDataSo.aiViewDataList.Find(item => item.Idx == idx); - public AiStat GetAiStatSoKey(string idx) => AiStatDataSo.aiStatDataList.Find(item => item.Idx == idx); - public Unit GetUnitSoKey(string idx) => UnitDataSo.unitDataList.Find(item => item.Idx == idx); - public Unit GetEnemyUnitSoKey(string idx) => EnemyUnitDataSo.unitDataList.Find(item => item.Idx == idx); + public AiView GetAiViewSoKey(string idx) => AiViewDataSo.aiViewDataList.Find(item => item.Idx == idx); + public AiStat GetAiStatSoKey(string idx) => AiStatDataSo.aiStatDataList.Find(item => item.Idx == idx); + public Unit GetUnitSoKey(string idx) => UnitDataSo.unitDataList.Find(item => item.Idx == idx); + public Unit GetEnemyUnitSoKey(string idx) => EnemyUnitDataSo.unitDataList.Find(item => item.Idx == idx); #endif + } } \ No newline at end of file diff --git a/BlueWater/Assets/02.Scripts/GameManager.cs b/BlueWater/Assets/02.Scripts/GameManager.cs index 3c394fa81..de315954d 100644 --- a/BlueWater/Assets/02.Scripts/GameManager.cs +++ b/BlueWater/Assets/02.Scripts/GameManager.cs @@ -1,50 +1,51 @@ -using System; -using System.Collections; using System.Collections.Generic; -using _02.Scripts.WaterAndShip; using BlueWaterProject; using Sirenix.OdinInspector; using UnityEngine; -public class GameManager : Singleton +// ReSharper disable once CheckNamespace +namespace BlueWaterProject { - [Title("Controller")] - public CameraController CameraController { get; private set; } - public Player player; - public List boats = new List(10); - - [Range(0f, 1f)] - [SerializeField] private float slowSpeed = 0.1f; - - private void Init() + public class GameManager : Singleton { - CameraController = FindObjectOfType(); - player = FindObjectOfType(); - } - protected override void OnAwake() - { - Init(); - } + [Title("Controller")] + public CameraController CameraController { get; private set; } + public Player player; + public List boats = new List(10); - private void Start() - { - Cursor.lockState = CursorLockMode.Confined; - } + [Range(0f, 1f)] + [SerializeField] private float slowSpeed = 0.1f; - public void testPrint() - { - print("Boat가 목표에 도착해서 이 함수를 호출합니다"); - } + private void Init() + { + CameraController = FindObjectOfType(); + player = FindObjectOfType(); + } + protected override void OnAwake() + { + Init(); + } - public void SlowSpeedMode() - { - Time.timeScale = slowSpeed; - Time.fixedDeltaTime = 0.02f * Time.timeScale; - } + private void Start() + { + Cursor.lockState = CursorLockMode.Confined; + } + + public void testPrint() + { + print("Boat가 목표에 도착해서 이 함수를 호출합니다"); + } + + public void SlowSpeedMode() + { + Time.timeScale = slowSpeed; + Time.fixedDeltaTime = 0.02f * Time.timeScale; + } - public void DefaultSpeedMode() - { - Time.timeScale = 1f; - Time.fixedDeltaTime = 0.02f; + public void DefaultSpeedMode() + { + Time.timeScale = 1f; + Time.fixedDeltaTime = 0.02f; + } } } diff --git a/BlueWater/Assets/02.Scripts/Interface/IDameable23.cs b/BlueWater/Assets/02.Scripts/Interface/IDameable23.cs new file mode 100644 index 000000000..e36dc8df5 --- /dev/null +++ b/BlueWater/Assets/02.Scripts/Interface/IDameable23.cs @@ -0,0 +1,7 @@ +namespace BlueWaterProject +{ + public interface IDamageable2 + { + public void TakeDamage(float damage); + } +} \ No newline at end of file diff --git a/BlueWater/Assets/02.Scripts/Interface/IDameable23.cs.meta b/BlueWater/Assets/02.Scripts/Interface/IDameable23.cs.meta new file mode 100644 index 000000000..321e66282 --- /dev/null +++ b/BlueWater/Assets/02.Scripts/Interface/IDameable23.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 4fdb6e266dc14508a1b2645a7783193c +timeCreated: 1693456465 \ No newline at end of file diff --git a/BlueWater/Assets/02.Scripts/Player/Card.cs b/BlueWater/Assets/02.Scripts/Player/Card.cs index 949644210..2b19cf317 100644 --- a/BlueWater/Assets/02.Scripts/Player/Card.cs +++ b/BlueWater/Assets/02.Scripts/Player/Card.cs @@ -2,7 +2,8 @@ using System; using BlueWaterProject; using UnityEngine; -namespace _02.Scripts.WaterAndShip +// ReSharper disable once CheckNamespace +namespace BlueWaterProject { [Serializable] public class Card : IIdx diff --git a/BlueWater/Assets/02.Scripts/Player/Player.cs b/BlueWater/Assets/02.Scripts/Player/Player.cs index 0d1d569cd..2bff91e3c 100644 --- a/BlueWater/Assets/02.Scripts/Player/Player.cs +++ b/BlueWater/Assets/02.Scripts/Player/Player.cs @@ -1,10 +1,10 @@ -using Cinemachine; +using Blobcreate.ProjectileToolkit; using Sirenix.OdinInspector; using UnityEngine; using UnityEngine.InputSystem; -using Blobcreate. ProjectileToolkit; -namespace _02.Scripts.WaterAndShip +// ReSharper disable once CheckNamespace +namespace BlueWaterProject { [RequireComponent(typeof(Rigidbody))] [RequireComponent(typeof(PlayerInput))] @@ -31,6 +31,11 @@ namespace _02.Scripts.WaterAndShip [Tooltip("캐릭터의 이동 속도")] public float characterSpeed = 10f; + [Title("레이더")] + public Collider[] radar = new Collider[10]; + public Transform[] inCameraRadar = new Transform[10]; + public Transform target; + public bool IsAssaultMode { get; set; } public bool IsInShipMode { get; set; } public bool IsDredgeMode { get; set; } diff --git a/BlueWater/Assets/02.Scripts/UiManager.cs b/BlueWater/Assets/02.Scripts/UiManager.cs index 325c2b2f4..6af478bdd 100644 --- a/BlueWater/Assets/02.Scripts/UiManager.cs +++ b/BlueWater/Assets/02.Scripts/UiManager.cs @@ -1,66 +1,67 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using Doozy.Runtime.Reactor.Animations; using Doozy.Runtime.Reactor.Animators; using Sirenix.OdinInspector; using UnityEngine; -public class UiManager : Singleton +// ReSharper disable once CheckNamespace +namespace BlueWaterProject { - [Title("Card")] - private Transform cardLayoutGroup; - public UIAnimator CardLayoutGroupAnimator { get; set; } + public class UiManager : Singleton + { + [Title("Card")] + private Transform cardLayoutGroup; + public UIAnimator CardLayoutGroupAnimator { get; set; } - [Title("TakeAim")] - private GameObject takeAim; - private Texture2D cursorTexture; - private bool isTakeAim; + [Title("TakeAim")] + private GameObject takeAim; + private Texture2D cursorTexture; + private bool isTakeAim; - private void Init() - { - cardLayoutGroup = transform.Find("CardLayoutGroup"); - CardLayoutGroupAnimator = cardLayoutGroup.GetComponent(); - takeAim = transform.Find("Aim").gameObject; - } - - protected override void OnAwake() - { - Init(); - } - - private void Start() - { - CursorTextureChange(); - AssaultCardInit(); - } - - public void AddCard() //TODO Test button and function, delete later - { - Instantiate(DataManager.Inst.assaultCard, cardLayoutGroup); - } - - public void AimOnOff(bool isOn) - { - takeAim.SetActive(isOn); - isTakeAim = isOn; - } - - private void CursorTextureChange() - { - cursorTexture = DataManager.Inst.cursorTexture; - var hotSpot = new Vector2(cursorTexture.width / 2f, cursorTexture.height / 2f); - Cursor.SetCursor(cursorTexture, hotSpot, CursorMode.Auto); - } - - private void AssaultCardInit() - { - for (int i = 0; i < DataManager.Inst.CardList.Count; i++) + private void Init() { - var obj = Instantiate(DataManager.Inst.assaultCard, cardLayoutGroup); - var draggableCard = obj.GetComponent(); - draggableCard.card = DataManager.Inst.GetCardDictionaryFromKey(DataManager.Inst.CardList[i]); - draggableCard.CardInit(); + cardLayoutGroup = transform.Find("CardLayoutGroup"); + CardLayoutGroupAnimator = cardLayoutGroup.GetComponent(); + takeAim = transform.Find("Aim").gameObject; + } + + protected override void OnAwake() + { + Init(); + } + + private void Start() + { + CursorTextureChange(); + AssaultCardInit(); + } + + public void AddCard() //TODO Test button and function, delete later + { + Instantiate(DataManager.Inst.assaultCard, cardLayoutGroup); + } + + public void AimOnOff(bool isOn) + { + takeAim.SetActive(isOn); + isTakeAim = isOn; + } + + private void CursorTextureChange() + { + cursorTexture = DataManager.Inst.cursorTexture; + //var hotSpot = new Vector2(cursorTexture.width / 2f, cursorTexture.height / 2f); + var hotSpot = Vector2.zero; + Cursor.SetCursor(cursorTexture, hotSpot, CursorMode.Auto); + } + + private void AssaultCardInit() + { + for (int i = 0; i < DataManager.Inst.CardList.Count; i++) + { + var obj = Instantiate(DataManager.Inst.assaultCard, cardLayoutGroup); + var draggableCard = obj.GetComponent(); + draggableCard.card = DataManager.Inst.GetCardDictionaryFromKey(DataManager.Inst.CardList[i]); + draggableCard.CardInit(); + } } } } diff --git a/BlueWater/Assets/02.Scripts/Utility/GlobalValue.cs b/BlueWater/Assets/02.Scripts/Utility/GlobalValue.cs index be39ea902..a25bd5144 100644 --- a/BlueWater/Assets/02.Scripts/Utility/GlobalValue.cs +++ b/BlueWater/Assets/02.Scripts/Utility/GlobalValue.cs @@ -1,25 +1,29 @@ -public class GlobalValue +// ReSharper disable once CheckNamespace +namespace BlueWaterProject { - public const int CARD_DATA_CAPACITY = 50; - public const int AI_VIEW_DATA_CAPACITY = 50; - public const int AI_STAT_DATA_CAPACITY = 50; - public const int UNIT_DATA_CAPACITY = 50; - public const int ISLAND_DATA_CAPACITY = 50; - public const int ONE_UNIT_CAPACITY = 16; - public const int AI_ANIMATOR_CAPACITY = 10; - - public enum UnitType + public class GlobalValue { - NONE = -1, - ARCHER_E, - SPEAR_KNIGHT_E, - SPEARMAN_E, - SWORD_KNIGHT_E, - SWORDMAN_E, - ARCHER_P, - AXEMAN_P, - SPEARMAN_P, - SWORD_KNIGHT_P, - SWORDMAN_P + public const int CARD_DATA_CAPACITY = 50; + public const int AI_VIEW_DATA_CAPACITY = 50; + public const int AI_STAT_DATA_CAPACITY = 50; + public const int UNIT_DATA_CAPACITY = 50; + public const int ISLAND_DATA_CAPACITY = 50; + public const int ONE_UNIT_CAPACITY = 16; + public const int AI_ANIMATOR_CAPACITY = 10; + + public enum UnitType + { + NONE = -1, + ARCHER_E, + SPEAR_KNIGHT_E, + SPEARMAN_E, + SWORD_KNIGHT_E, + SWORDMAN_E, + ARCHER_P, + AXEMAN_P, + SPEARMAN_P, + SWORD_KNIGHT_P, + SWORDMAN_P + } } } diff --git a/BlueWater/Assets/02.Scripts/WaterAndFloater/Gerstner wave/Floater.cs b/BlueWater/Assets/02.Scripts/WaterAndFloater/Gerstner wave/Floater.cs index 73697de44..d8c91c274 100644 --- a/BlueWater/Assets/02.Scripts/WaterAndFloater/Gerstner wave/Floater.cs +++ b/BlueWater/Assets/02.Scripts/WaterAndFloater/Gerstner wave/Floater.cs @@ -1,49 +1,51 @@ -using System.Collections; -using System.Collections.Generic; using Sirenix.OdinInspector; using UnityEngine; -[RequireComponent(typeof(Rigidbody))] -public class Floater : MonoBehaviour +// ReSharper disable once CheckNamespace +namespace BlueWaterProject { - private GerstnerWave waveGenerator; - [InfoBox("배가 얼마나 물에 잠길지 정합니다. 낮을수록 물에 잠깁니다.")] - public float boatOffset = 0.0f; // new variable - private Rigidbody rb; - - private void Start() + [RequireComponent(typeof(Rigidbody))] + public class Floater : MonoBehaviour { - waveGenerator = FindObjectOfType(); - rb = GetComponent(); - } + private GerstnerWave waveGenerator; + [InfoBox("배가 얼마나 물에 잠길지 정합니다. 낮을수록 물에 잠깁니다.")] + public float boatOffset = 0.0f; // new variable + private Rigidbody rb; - void FixedUpdate() - { - var waveNumber = 2.0f * Mathf.PI / waveGenerator.waveLength; - var phaseConstant = waveGenerator.speed * waveNumber; + private void Start() + { + waveGenerator = FindObjectOfType(); + rb = GetComponent(); + } - // Convert the boat's world position to the wave's local position - var localPosition = waveGenerator.transform.InverseTransformPoint(rb.position); - var dotProduct = Vector2.Dot(new Vector2(localPosition.x, localPosition.z), waveGenerator.direction); + void FixedUpdate() + { + var waveNumber = 2.0f * Mathf.PI / waveGenerator.waveLength; + var phaseConstant = waveGenerator.speed * waveNumber; - var wavePhase = waveNumber * dotProduct + phaseConstant * Time.time; + // Convert the boat's world position to the wave's local position + var localPosition = waveGenerator.transform.InverseTransformPoint(rb.position); + var dotProduct = Vector2.Dot(new Vector2(localPosition.x, localPosition.z), waveGenerator.direction); - // Calculate the new height - var newY = waveGenerator.amplitude * Mathf.Sin(wavePhase) + boatOffset; - localPosition.y = newY; + var wavePhase = waveNumber * dotProduct + phaseConstant * Time.time; - // Convert the position back to world coordinates - rb.MovePosition(waveGenerator.transform.TransformPoint(localPosition)); + // Calculate the new height + var newY = waveGenerator.amplitude * Mathf.Sin(wavePhase) + boatOffset; + localPosition.y = newY; - // Calculate the wave's normal at the boat's position - var normal = new Vector3( - -waveGenerator.amplitude * waveNumber * waveGenerator.direction.x * Mathf.Cos(wavePhase), - 1.0f, - -waveGenerator.amplitude * waveNumber * waveGenerator.direction.y * Mathf.Cos(wavePhase) - ).normalized; + // Convert the position back to world coordinates + rb.MovePosition(waveGenerator.transform.TransformPoint(localPosition)); - // Rotate the boat to align with the wave's normal - var targetRotation = Quaternion.FromToRotation(transform.up, normal) * transform.rotation; - rb.MoveRotation(Quaternion.Slerp(transform.rotation, targetRotation, Time.deltaTime * waveGenerator.speed)); + // Calculate the wave's normal at the boat's position + var normal = new Vector3( + -waveGenerator.amplitude * waveNumber * waveGenerator.direction.x * Mathf.Cos(wavePhase), + 1.0f, + -waveGenerator.amplitude * waveNumber * waveGenerator.direction.y * Mathf.Cos(wavePhase) + ).normalized; + + // Rotate the boat to align with the wave's normal + var targetRotation = Quaternion.FromToRotation(transform.up, normal) * transform.rotation; + rb.MoveRotation(Quaternion.Slerp(transform.rotation, targetRotation, Time.deltaTime * waveGenerator.speed)); + } } } \ No newline at end of file diff --git a/BlueWater/Assets/02.Scripts/WaterAndFloater/Gerstner wave/GerstnerWave.cs b/BlueWater/Assets/02.Scripts/WaterAndFloater/Gerstner wave/GerstnerWave.cs index 40d483286..9db52b5d5 100644 --- a/BlueWater/Assets/02.Scripts/WaterAndFloater/Gerstner wave/GerstnerWave.cs +++ b/BlueWater/Assets/02.Scripts/WaterAndFloater/Gerstner wave/GerstnerWave.cs @@ -1,61 +1,63 @@ -using System.Collections; -using System.Collections.Generic; using Sirenix.OdinInspector; using UnityEngine; -public class GerstnerWave : MonoBehaviour +// ReSharper disable once CheckNamespace +namespace BlueWaterProject { - [InfoBox("파도의 길이를 결정, 값이 클수록 파도 간의 간격이 커짐")] - public float waveLength = 0.1f; - [InfoBox("파도의 높이를 결정, 값이 클수록 파도의 높이가 커짐")] - public float amplitude = 0.1f; - [InfoBox("파도의 속도를 결정, 값이 클수록 파도의 속도가 오름")] - public float speed = 1f; - [InfoBox("파도의 방향을 결정")] - public Vector2 direction = new Vector2(1.0f, 0.0f); - - private void FixedUpdate() + public class GerstnerWave : MonoBehaviour { - var mesh = GetComponent().mesh; - var vertices = mesh.vertices; - var normals = mesh.normals; + [InfoBox("파도의 길이를 결정, 값이 클수록 파도 간의 간격이 커짐")] + public float waveLength = 0.1f; + [InfoBox("파도의 높이를 결정, 값이 클수록 파도의 높이가 커짐")] + public float amplitude = 0.1f; + [InfoBox("파도의 속도를 결정, 값이 클수록 파도의 속도가 오름")] + public float speed = 1f; + [InfoBox("파도의 방향을 결정")] + public Vector2 direction = new Vector2(1.0f, 0.0f); - var waveNumber = 2.0f * Mathf.PI / waveLength; - var phaseConstant = speed * waveNumber; - - for (var i = 0; i < vertices.Length; i++) + private void FixedUpdate() { - var vertex = vertices[i]; - var dotProduct = Vector2.Dot(new Vector2(vertex.x, vertex.z), direction); - var wavePhase = waveNumber * dotProduct + phaseConstant * Time.time; - vertex.y = amplitude * Mathf.Sin(wavePhase); - vertices[i] = vertex; + var mesh = GetComponent().mesh; + var vertices = mesh.vertices; + var normals = mesh.normals; - // Calculate the normal at the vertex - var cosPhase = Mathf.Cos(wavePhase); - var dx = -waveNumber * amplitude * direction.x * cosPhase; - var dz = -waveNumber * amplitude * direction.y * cosPhase; - normals[i] = new Vector3(dx, 1.0f, dz).normalized; + var waveNumber = 2.0f * Mathf.PI / waveLength; + var phaseConstant = speed * waveNumber; + + for (var i = 0; i < vertices.Length; i++) + { + var vertex = vertices[i]; + var dotProduct = Vector2.Dot(new Vector2(vertex.x, vertex.z), direction); + var wavePhase = waveNumber * dotProduct + phaseConstant * Time.time; + vertex.y = amplitude * Mathf.Sin(wavePhase); + vertices[i] = vertex; + + // Calculate the normal at the vertex + var cosPhase = Mathf.Cos(wavePhase); + var dx = -waveNumber * amplitude * direction.x * cosPhase; + var dz = -waveNumber * amplitude * direction.y * cosPhase; + normals[i] = new Vector3(dx, 1.0f, dz).normalized; + } + + mesh.vertices = vertices; + mesh.normals = normals; } - mesh.vertices = vertices; - mesh.normals = normals; - } + public Vector3 GetWaveNormal(Vector3 position) + { + var waveNumber = 2.0f * Mathf.PI / waveLength; + var phaseConstant = speed * waveNumber; + var dotProduct = Vector2.Dot(new Vector2(position.x + transform.position.x, position.z + transform.position.z), direction); + var wavePhase = waveNumber * dotProduct + phaseConstant * Time.time; - public Vector3 GetWaveNormal(Vector3 position) - { - var waveNumber = 2.0f * Mathf.PI / waveLength; - var phaseConstant = speed * waveNumber; - var dotProduct = Vector2.Dot(new Vector2(position.x + transform.position.x, position.z + transform.position.z), direction); - var wavePhase = waveNumber * dotProduct + phaseConstant * Time.time; + var cosPhase = Mathf.Cos(wavePhase); - var cosPhase = Mathf.Cos(wavePhase); + // We differentiate the wave function to get the slope at the current point + var dx = -waveNumber * amplitude * direction.x * cosPhase; + var dz = -waveNumber * amplitude * direction.y * cosPhase; - // We differentiate the wave function to get the slope at the current point - var dx = -waveNumber * amplitude * direction.x * cosPhase; - var dz = -waveNumber * amplitude * direction.y * cosPhase; - - var normal = new Vector3(dx, 1.0f, dz).normalized; - return normal; + var normal = new Vector3(dx, 1.0f, dz).normalized; + return normal; + } } } \ No newline at end of file diff --git a/BlueWater/Assets/03.Images/Materials.meta b/BlueWater/Assets/03.Images/Materials.meta deleted file mode 100644 index 20ddf4811..000000000 --- a/BlueWater/Assets/03.Images/Materials.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 9be5d028954e34a15b3129993935f16d -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/BlueWater/Assets/03.Images/Materials/cha_03_front.mat b/BlueWater/Assets/03.Images/Materials/cha_03_front.mat deleted file mode 100644 index 7eaabaf1b..000000000 --- a/BlueWater/Assets/03.Images/Materials/cha_03_front.mat +++ /dev/null @@ -1,133 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &-8597644214347470203 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 7 ---- !u!21 &2100000 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: cha_03_front - m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 2800000, guid: 34aa7a8380a65426b86643fc3f7dbd50, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 2800000, guid: 34aa7a8380a65426b86643fc3f7dbd50, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _AlphaClip: 0 - - _AlphaToMask: 0 - - _Blend: 0 - - _BlendModePreserveSpecular: 1 - - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _DstBlendAlpha: 0 - - _EnvironmentReflections: 1 - - _GlossMapScale: 0 - - _Glossiness: 0 - - _GlossyReflections: 0 - - _Metallic: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.005 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _SrcBlendAlpha: 1 - - _Surface: 0 - - _WorkflowMode: 1 - - _ZWrite: 1 - m_Colors: - - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] diff --git a/BlueWater/Assets/03.Images/Materials/cha_03_front.mat.meta b/BlueWater/Assets/03.Images/Materials/cha_03_front.mat.meta deleted file mode 100644 index 45f23585a..000000000 --- a/BlueWater/Assets/03.Images/Materials/cha_03_front.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7099ab9e7778140b789b0edd4d6a2dbe -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/BlueWater/Assets/03.Images/icons8-cursor-96-2.png b/BlueWater/Assets/03.Images/icons8-cursor-96-2.png new file mode 100644 index 0000000000000000000000000000000000000000..bd301e35d4da8e3405ea5d9c218d3f2707889dc6 GIT binary patch literal 4195 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 literal 0 HcmV?d00001 diff --git a/BlueWater/Assets/03.Images/icons8-cursor-96.png.meta b/BlueWater/Assets/03.Images/icons8-cursor-96.png.meta new file mode 100644 index 000000000..2049bd04e --- /dev/null +++ b/BlueWater/Assets/03.Images/icons8-cursor-96.png.meta @@ -0,0 +1,124 @@ +fileFormatVersion: 2 +guid: 3a146044a282641d99ba04c33b8c2bbf +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 2 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/BlueWater/Assets/05.Prefabs/Boat.prefab b/BlueWater/Assets/05.Prefabs/Boat.prefab index a27f92dfc..1bf4c84b0 100644 --- a/BlueWater/Assets/05.Prefabs/Boat.prefab +++ b/BlueWater/Assets/05.Prefabs/Boat.prefab @@ -97,7 +97,7 @@ NavMeshAgent: m_Enabled: 1 m_AgentTypeID: -1372625422 m_Radius: 0.5 - m_Speed: 3.5 + m_Speed: 5 m_Acceleration: 8 avoidancePriority: 50 m_AngularSpeed: 500 diff --git a/BlueWater/Assets/Low Poly Modular Terrain Pack/Terrain_Assets/Materials/CPT_Terrain_01.mat b/BlueWater/Assets/Low Poly Modular Terrain Pack/Terrain_Assets/Materials/CPT_Terrain_01.mat index edd874d4b..72a98c649 100644 --- a/BlueWater/Assets/Low Poly Modular Terrain Pack/Terrain_Assets/Materials/CPT_Terrain_01.mat +++ b/BlueWater/Assets/Low Poly Modular Terrain Pack/Terrain_Assets/Materials/CPT_Terrain_01.mat @@ -13,6 +13,7 @@ Material: m_ModifiedSerializedProperties: 0 m_ValidKeywords: - DR_GRADIENT_ON + - DR_OUTLINE_ON - DR_RIM_ON - _CELPRIMARYMODE_SINGLE - _DETAILMAPBLENDINGMODE_MULTIPLY @@ -24,8 +25,7 @@ Material: m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} - disabledShaderPasses: - - SRPDEFAULTUNLIT + disabledShaderPasses: [] m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -144,7 +144,7 @@ Material: - _Mode: 0 - _OcclusionStrength: 1 - _OutlineDepthOffset: 0 - - _OutlineEnabled: 0 + - _OutlineEnabled: 1 - _OutlineScale: 1 - _OutlineWidth: 1 - _OverrideLightmapDir: 0 diff --git a/BlueWater/Assets/Low Poly Modular Terrain Pack/Terrain_Assets/Materials/Ice_01.mat b/BlueWater/Assets/Low Poly Modular Terrain Pack/Terrain_Assets/Materials/Ice_01.mat index 72961002c..3557553ce 100644 --- a/BlueWater/Assets/Low Poly Modular Terrain Pack/Terrain_Assets/Materials/Ice_01.mat +++ b/BlueWater/Assets/Low Poly Modular Terrain Pack/Terrain_Assets/Materials/Ice_01.mat @@ -13,6 +13,7 @@ Material: m_ModifiedSerializedProperties: 0 m_ValidKeywords: - DR_GRADIENT_ON + - DR_OUTLINE_ON - DR_RIM_ON - _CELPRIMARYMODE_SINGLE - _DETAILMAPBLENDINGMODE_MULTIPLY @@ -25,8 +26,7 @@ Material: m_CustomRenderQueue: 2000 stringTagMap: RenderType: Opaque - disabledShaderPasses: - - SRPDEFAULTUNLIT + disabledShaderPasses: [] m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -213,7 +213,7 @@ Material: - _NumLayersCount: 1 - _OcclusionStrength: 1 - _OutlineDepthOffset: 0 - - _OutlineEnabled: 0 + - _OutlineEnabled: 1 - _OutlineScale: 1 - _OutlineWidth: 1 - _OverrideLightmapDir: 0