From 1cdcf31548529659829608b4171d256b992560ad Mon Sep 17 00:00:00 2001 From: Ino Date: Wed, 14 Jan 2026 13:16:15 +0900 Subject: [PATCH] =?UTF-8?q?=ED=99=94=EC=82=B4=ED=91=9C=20=EC=A7=80?= =?UTF-8?q?=EC=A0=95=ED=95=98=EB=A9=B4=20=ED=95=B4=EB=8B=B9=20=EC=9C=84?= =?UTF-8?q?=EC=B9=98=EB=A1=9C=20=EA=B3=84=EC=86=8D=20=EC=8F=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/OneShotOneKill.txt | 2 - .../Script/InGame/Actor/AimArrowController.cs | 23 +++++++++-- Assets/Script/InGame/Actor/AimController.cs | 38 ------------------- .../Script/InGame/Actor/AimController.cs.meta | 2 - Assets/Script/InGame/Actor/AimInputArea.cs | 2 +- 5 files changed, 21 insertions(+), 46 deletions(-) delete mode 100644 Assets/Script/InGame/Actor/AimController.cs delete mode 100644 Assets/Script/InGame/Actor/AimController.cs.meta diff --git a/Assets/OneShotOneKill.txt b/Assets/OneShotOneKill.txt index e33196c..c0288dd 100644 --- a/Assets/OneShotOneKill.txt +++ b/Assets/OneShotOneKill.txt @@ -1,5 +1,3 @@ -화살표 지정하면 해당 위치로 계속 쏘기 - 실제 스킬 선택 스킬 15종 diff --git a/Assets/Script/InGame/Actor/AimArrowController.cs b/Assets/Script/InGame/Actor/AimArrowController.cs index 4c6d6d4..accc2ce 100644 --- a/Assets/Script/InGame/Actor/AimArrowController.cs +++ b/Assets/Script/InGame/Actor/AimArrowController.cs @@ -9,16 +9,33 @@ public class AimArrowController : MonoBehaviour Vector2 startPos; bool isAiming; + float m_attackTime, m_attackLifeTime; void Start() { - arrow.enabled = false; + //arrow.enabled = false; + } + + private void OnEnable() + { + var unit = IngameMgr.Ins.Get_CurUnitTData(); + m_attackLifeTime = m_attackTime = unit.f_AttackSpeed; + } + + private void Update() + { + m_attackLifeTime -= Time.deltaTime; + if (m_attackLifeTime <= 0) + { + m_attackLifeTime = m_attackTime; + OnAimEnd(); + } } public void OnAimStart(Vector2 screenPos) { isAiming = true; - arrow.enabled = true; + //arrow.enabled = true; UpdateArrow(screenPos); } @@ -30,7 +47,7 @@ public class AimArrowController : MonoBehaviour public void OnAimEnd() { - arrow.enabled = false; + //arrow.enabled = false; isAiming = false; var unit = IngameMgr.Ins.Get_CurUnitTData(); diff --git a/Assets/Script/InGame/Actor/AimController.cs b/Assets/Script/InGame/Actor/AimController.cs deleted file mode 100644 index 3335c95..0000000 --- a/Assets/Script/InGame/Actor/AimController.cs +++ /dev/null @@ -1,38 +0,0 @@ -using UnityEngine; - -public class AimController : MonoBehaviour -{ - public LineRenderer line; - public float maxDistance = 5f; - - private Vector2 startPos; - private bool isAiming; - - void Update() - { - if (Input.GetMouseButtonDown(0)) - { - startPos = Camera.main.ScreenToWorldPoint(Input.mousePosition); - isAiming = true; - line.enabled = true; - } - - if (Input.GetMouseButton(0) && isAiming) - { - Vector2 currentPos = Camera.main.ScreenToWorldPoint(Input.mousePosition); - Vector2 dir = Vector2.ClampMagnitude(currentPos - startPos, maxDistance); - - line.SetPosition(0, transform.position); - line.SetPosition(1, (Vector2)transform.position + dir); - } - - if (Input.GetMouseButtonUp(0) && isAiming) - { - Vector2 endPos = Camera.main.ScreenToWorldPoint(Input.mousePosition); - Vector2 shootDir = (endPos - startPos).normalized; - - line.enabled = false; - isAiming = false; - } - } -} \ No newline at end of file diff --git a/Assets/Script/InGame/Actor/AimController.cs.meta b/Assets/Script/InGame/Actor/AimController.cs.meta deleted file mode 100644 index 24e2c2d..0000000 --- a/Assets/Script/InGame/Actor/AimController.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: bc2eb6f2e5a4e2e449cd1e1e4160ad82 \ No newline at end of file diff --git a/Assets/Script/InGame/Actor/AimInputArea.cs b/Assets/Script/InGame/Actor/AimInputArea.cs index 9a4463f..bfffc52 100644 --- a/Assets/Script/InGame/Actor/AimInputArea.cs +++ b/Assets/Script/InGame/Actor/AimInputArea.cs @@ -17,6 +17,6 @@ public class AimInputArea : MonoBehaviour, IPointerDownHandler, IPointerUpHandle public void OnPointerUp(PointerEventData eventData) { - aim.OnAimEnd(); + //aim.OnAimEnd(); } } \ No newline at end of file