diff --git a/Assets/Zion/Scripts/Adam/FiniteStateMachines/LineDrawingState.cs b/Assets/Zion/Scripts/Adam/FiniteStateMachines/LineDrawingState.cs index c2d16ba0..fff5b097 100644 --- a/Assets/Zion/Scripts/Adam/FiniteStateMachines/LineDrawingState.cs +++ b/Assets/Zion/Scripts/Adam/FiniteStateMachines/LineDrawingState.cs @@ -103,8 +103,6 @@ namespace Umawerse.FiniteStateMachines _line.positionCount = vertices.Count; var vs = vertices.ToArray(); _line.SetPositions(vs); - root.wrjManager.currentWRJ.wayPoints = vertices; - } private void CorrectDirection() diff --git a/Assets/Zion/Scripts/Adam/ToolsBootstrap.cs b/Assets/Zion/Scripts/Adam/ToolsBootstrap.cs index 5a18f81c..790a97b0 100644 --- a/Assets/Zion/Scripts/Adam/ToolsBootstrap.cs +++ b/Assets/Zion/Scripts/Adam/ToolsBootstrap.cs @@ -104,7 +104,7 @@ public class ToolsBootstrap : MonoSingleton mCamera.transform.eulerAngles = new Vector3(45.8f, -13f, 0f); mCamera.orthographic = false; tapGesture.SetLayerMask(1 << 10); - wrjManager.currentWRJ.isAuto = false; + wrjManager.wrjMenuSetPanel.gameObject.SetActive(false); simpleCameraController.enabled = true; } @@ -113,18 +113,6 @@ public class ToolsBootstrap : MonoSingleton private void Update() { _fsm.Update(); - - if (Input.GetMouseButtonDown(0)) - { - if (tapGesture.HitTest().collider != null) - { - if (tapGesture.HitTest().collider.gameObject.layer == 10) - { - - wrjManager.currentWRJ.SetAttackTarget(tapGesture.HitTest().collider.gameObject.GetComponent()); - } - } - } } public void SwitchState(int indexState) @@ -152,7 +140,6 @@ public class ToolsBootstrap : MonoSingleton isDistance = false; _fsm.SetState(StateName.line); SwitchSet2DMap(2); - wrjManager.currentWRJ.isAuto = true; wrjManager.wrjMenuSetPanel.gameObject.SetActive(false); } @@ -161,11 +148,6 @@ public class ToolsBootstrap : MonoSingleton /// public void StartDeduction() { - //wrjManager.currentWRJ.isMove = true; - for (int i = 0; i < wrjManager.wRJControllers.Count; i++) - { - wrjManager.wRJControllers[i].SetMove(); - } } diff --git a/Assets/Zion/Scripts/Adam/Utility/Sync/AsyncObjectBase.cs b/Assets/Zion/Scripts/Adam/Utility/Sync/AsyncObjectBase.cs index 942e76e3..0e5eb756 100644 --- a/Assets/Zion/Scripts/Adam/Utility/Sync/AsyncObjectBase.cs +++ b/Assets/Zion/Scripts/Adam/Utility/Sync/AsyncObjectBase.cs @@ -42,7 +42,6 @@ namespace AdamSync //string palyerJoinRoom = "joinroom " + ""; //_ = SyncCreateRoom.SendMessageAsync(palyerJoinRoom); gameObject.tag = "MainCamera"; - } } } diff --git a/Assets/Zion/Scripts/Adam/WRJManager.cs b/Assets/Zion/Scripts/Adam/WRJManager.cs index 3e15c0bf..bf26b57f 100644 --- a/Assets/Zion/Scripts/Adam/WRJManager.cs +++ b/Assets/Zion/Scripts/Adam/WRJManager.cs @@ -9,8 +9,6 @@ namespace Assets.Zion.Scripts.Adam { public class WRJManager : MonoBehaviour { - public List wRJControllers = new List(); - public WRJController currentWRJ; public RectTransform wrjMenuSetPanel; public RectTransform canvasRect; @@ -27,16 +25,16 @@ namespace Assets.Zion.Scripts.Adam RaycastHit hitInfo; if (Physics.Raycast(ray, out hitInfo, 1000)) { - if (hitInfo.collider.tag == "WRJ") + EquipmentCommon ec = hitInfo.collider.GetComponent(); + if (ec != null && ec.isPlayer) { - //Debug.Log("daadad"); - currentWRJ = hitInfo.collider.GetComponent(); - if (!wRJControllers.Contains(currentWRJ)) - wRJControllers.Add(currentWRJ); - wrjMenuSetPanel.localScale = Vector3.one; - Vector3 posItem = GetScreenPosition(hitInfo.collider.gameObject); - wrjMenuSetPanel.gameObject.SetActive(true); - wrjMenuSetPanel.anchoredPosition = new Vector3(posItem.x + 100f, posItem.y, posItem.z); + if (hitInfo.collider.tag == "WRJ") + { + wrjMenuSetPanel.localScale = Vector3.one; + Vector3 posItem = GetScreenPosition(hitInfo.collider.gameObject); + wrjMenuSetPanel.gameObject.SetActive(true); + wrjMenuSetPanel.anchoredPosition = new Vector3(posItem.x + 100f, posItem.y, posItem.z); + } } } else