From bc2367a27b4c5ce5ccde920a3464ef78c2cc8ebd Mon Sep 17 00:00:00 2001 From: Ino Date: Wed, 5 Mar 2025 08:42:24 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B9=B4=EB=A9=94=EB=9D=BC=20=ED=83=80?= =?UTF-8?q?=EA=B2=9F=20=EA=B3=A0=EC=A0=95,=20=EC=94=AC=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99=20=EC=8B=9C=20=ED=88=AC=EC=82=AC=EC=B2=B4=20=EB=AA=A8?= =?UTF-8?q?=EB=91=90=20=EB=81=84=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Ino_nerdnavis.txt | 9 ++-- Assets/Script/Character/Actor.cs | 2 +- Assets/Script/Character/Mob/BossMobActor.cs | 4 +- Assets/Script/Character/Mob/MobActor.cs | 2 +- Assets/Script/Character/PCActor.cs | 1 + Assets/Script/Info/InGameInfo.cs | 1 + Assets/Script/Info/ProjectileInfo.cs | 11 ++++- Assets/Script/UI/Ingame/MonsterSimpleInfo.cs | 32 ++++++++------- Assets/Script/Util/RealCamera.cs | 43 ++++++++++++-------- 9 files changed, 63 insertions(+), 42 deletions(-) diff --git a/Assets/Ino_nerdnavis.txt b/Assets/Ino_nerdnavis.txt index b5ddcdc51..83d1e3551 100644 --- a/Assets/Ino_nerdnavis.txt +++ b/Assets/Ino_nerdnavis.txt @@ -30,8 +30,6 @@ classconfig 에 의해 정해짐 - 기본 공속 - 기본 이속 - PC 장비 (현재 2종만 적용) -상태 이상 ui 표시 - - https://www.notion.so/devlucas/c4dc5df0d9d64c95963c6e540acdca7c#e3ef07bc84ff424790bb723835bbce87 장비 스탯 추가 구현 - 일꾼 이속, RND_SKILL @@ -64,6 +62,9 @@ messageinfo 엄청 느린 버그 - 몬스터 패트롤 거리 조절 - 점수와 골드 (기본 1점, 10골드만 주는 중(밸런스 필요)) -타겟 락 시 카메라 타겟에게 고정 -로딩 UI +상태 이상 ui 표시 + - https://www.notion.so/devlucas/c4dc5df0d9d64c95963c6e540acdca7c#e3ef07bc84ff424790bb723835bbce87 + +hud 이상 수정 +타겟 락 시 카메라 타겟에게 고정 diff --git a/Assets/Script/Character/Actor.cs b/Assets/Script/Character/Actor.cs index 38a25f125..3ef4ea4fb 100644 --- a/Assets/Script/Character/Actor.cs +++ b/Assets/Script/Character/Actor.cs @@ -2063,7 +2063,7 @@ public class Actor : MyCoroutine } protected void Shoot_Projectile(string proj, float lifetime, Vector3 startpos) { - if (ProjectileInfo.ProjectileInfoOn) + if (ProjectileInfo.isIns) { var ccData = Get_CCData(eCC.MultiShot); var amount = 1 + (ccData.CCTime > 0f ? ccData.CCVal : 0); diff --git a/Assets/Script/Character/Mob/BossMobActor.cs b/Assets/Script/Character/Mob/BossMobActor.cs index 92d6ce3a3..748a82701 100644 --- a/Assets/Script/Character/Mob/BossMobActor.cs +++ b/Assets/Script/Character/Mob/BossMobActor.cs @@ -116,7 +116,7 @@ public class BossMobActor : MobActor protected virtual void Set_Skill1Projectile(ProjectileBase pb) { } protected virtual void BossProjectile2(string s) { - if (ProjectileInfo.ProjectileInfoOn) + if (ProjectileInfo.isIns) ProjectileInfo.Ins.Shoot_Projectile(m_MonsterTableData.s_Porjectile2, this, m_Target, Get_Skill1Dmg(), Get_Skill1Pos(), m_MonsterTableData.f_ProjectileLifeTime2, pb => { Set_Skill1Projectile(pb); }); } @@ -126,7 +126,7 @@ public class BossMobActor : MobActor protected virtual void Set_Skill2Projectile(ProjectileBase pb) { } protected virtual void BossProjectile3(string s) { - if (ProjectileInfo.ProjectileInfoOn) + if (ProjectileInfo.isIns) ProjectileInfo.Ins.Shoot_Projectile(m_MonsterTableData.s_Porjectile3, this, m_Target, Get_Skill2Dmg(), Get_Skill2Pos(), m_MonsterTableData.f_ProjectileLifeTime3, pb => { Set_Skill2Projectile(pb); }); } diff --git a/Assets/Script/Character/Mob/MobActor.cs b/Assets/Script/Character/Mob/MobActor.cs index 12315b6f9..e6ae2292d 100644 --- a/Assets/Script/Character/Mob/MobActor.cs +++ b/Assets/Script/Character/Mob/MobActor.cs @@ -600,7 +600,7 @@ public class MobActor : Actor public override void Projectile(string s) { base.Projectile(s); - if (ProjectileInfo.ProjectileInfoOn) + if (ProjectileInfo.isIns) { if (m_MonsterTableData.n_PassiveSkillID > 0) { diff --git a/Assets/Script/Character/PCActor.cs b/Assets/Script/Character/PCActor.cs index 46bacf628..921e75f5e 100644 --- a/Assets/Script/Character/PCActor.cs +++ b/Assets/Script/Character/PCActor.cs @@ -457,6 +457,7 @@ public class PCActor : MyActor ActorInfo.Ins.All_Stop(true); NewGameUI.Ins.m_GuideQuestUI.Add_GuideQuest(ePurpose.DieOrQuit); DungeonInfo.Ins.Sub_WaveLife(); + MonsterSimpleInfo.Ins.Set_DelLockTarget(true); } protected override IEnumerator Co_ScaleControl(bool returntoOriginalScale, float targetscale, Action actComplete = null) diff --git a/Assets/Script/Info/InGameInfo.cs b/Assets/Script/Info/InGameInfo.cs index e40777d31..f3e9b71d7 100644 --- a/Assets/Script/Info/InGameInfo.cs +++ b/Assets/Script/Info/InGameInfo.cs @@ -163,6 +163,7 @@ public partial class InGameInfo : MyCoroutine public void Load_Map(int id) { AllEffectOff(); + if (ProjectileInfo.isIns) ProjectileInfo.Ins.AllOff(); MyValue.MyChoiceMapData.n_MapID = id; var Tdata = table_battlemapconfig.Ins.Get_Data(MyValue.MyChoiceMapData.n_MapID); m_GameMode = Tdata.e_MapType; diff --git a/Assets/Script/Info/ProjectileInfo.cs b/Assets/Script/Info/ProjectileInfo.cs index ede1928e1..022caea4d 100644 --- a/Assets/Script/Info/ProjectileInfo.cs +++ b/Assets/Script/Info/ProjectileInfo.cs @@ -5,7 +5,7 @@ using UnityEngine; public class ProjectileInfo : MonoBehaviour { - public static bool ProjectileInfoOn = false; + public static bool isIns = false; public static ProjectileInfo Ins; public Material[] arr_materials; // 0 얼음, 1 히트 @@ -18,7 +18,14 @@ public class ProjectileInfo : MonoBehaviour private void Awake() { Ins = this; - ProjectileInfoOn = true; + isIns = true; + } + + public void AllOff() + { + foreach (var projectileList in dic_projectile.Values) + foreach (var projectile in projectileList) + projectile.gameObject.SetActive(false); } IEnumerator Start() diff --git a/Assets/Script/UI/Ingame/MonsterSimpleInfo.cs b/Assets/Script/UI/Ingame/MonsterSimpleInfo.cs index 9c4e18a81..1e812b56f 100644 --- a/Assets/Script/UI/Ingame/MonsterSimpleInfo.cs +++ b/Assets/Script/UI/Ingame/MonsterSimpleInfo.cs @@ -10,17 +10,19 @@ public class MonsterSimpleInfo : MonoBehaviourSingletonTemplate list_tfCamactionTarget = new List(); + bool islockTarget; + Transform tf_lockTarget; + private void Awake() { OriminDistance = minDistance; @@ -91,17 +95,26 @@ public class RealCamera : MyCoroutine } } public void Add_CamActionTarget(Transform _target) { list_tfCamactionTarget.Add(_target); } + public void Set_LockTarget(Transform locktarget) + { + tf_lockTarget = locktarget; + islockTarget = tf_lockTarget; + } public void Set_TargetShow(Transform _target) { if (CamStatus != 0 && isTarget) { // 매개변수 타겟을 보게 카메라 회전 - if (godummy == null) godummy = new GameObject("CamDummy"); - godummy.transform.position = target.position; - godummy.transform.LookAt(_target); + Set_CamDummy(_target); Set_Coroutine(() => { rotateAround = godummy.transform.eulerAngles.y - 45f; }, 0.1f); } } + void Set_CamDummy(Transform _target) + { + if (godummy == null) godummy = new GameObject("CamDummy"); + godummy.transform.position = target.position; + godummy.transform.LookAt(_target); + } public void Set_Axis(bool _horizontal, float _value) { DragEndTime = 1f; @@ -184,43 +197,37 @@ public class RealCamera : MyCoroutine void Update_Cam() { - //Offset of the targets transform (Since the pivot point is usually at the feet). Vector3 targetOffset = target.position; Quaternion rotation = Quaternion.Euler(cameraHeight, rotateAround, cameraPan); Vector3 vectorMask = Vector3.one; Vector3 rotateVector = rotation * vectorMask; - //this determines where both the camera and it's mask will be. - //the camMask is for forcing the camera to push away from walls. camPosition = targetOffset + Vector3.up * DistanceUp - rotateVector * DistanceAway; camMask = targetOffset + Vector3.up * DistanceUp - rotateVector * DistanceAway; //occludeRay(ref targetOffset); transform.position = Vector3.Lerp(transform.position, camPosition, Time.deltaTime * smooth); + if (m_BackMove) { Vector3 backOffsetDirection = -transform.forward.normalized * m_BackOffSet.z; transform.position += new Vector3(backOffsetDirection.x, 0f, backOffsetDirection.z); } + if (islockTarget) + { + Set_CamDummy(tf_lockTarget); + rotateAround = godummy.transform.eulerAngles.y - 45f; + } + transform.LookAt(target.position + m_LookAt); #region wrap the cam orbit rotation - if (rotateAround > 360) - { - rotateAround = 0f; - } - else if (rotateAround < 0f) - { - rotateAround = (rotateAround + 360f); - } + if (rotateAround > 360) rotateAround = 0f; + else if (rotateAround < 0f) rotateAround += 360f; #endregion rotateAround += HorizontalAxis * camRotateSpeed * Time.deltaTime; - - //rotateAround = 145; - - if (HorizontalAxis >= -0.1f || HorizontalAxis <= 0.1f) HorizontalAxis = 0f; //DistanceUp = Mathf.Clamp(DistanceUp += VerticalAxis, -0.79f, 2.3f); DistanceAway = Mathf.Clamp(DistanceAway += VerticalAxis, minDistance, maxDistance);