This commit is contained in:
parent
71914a478e
commit
715711cf40
|
@ -103,8 +103,6 @@ namespace Umawerse.FiniteStateMachines
|
||||||
_line.positionCount = vertices.Count;
|
_line.positionCount = vertices.Count;
|
||||||
var vs = vertices.ToArray();
|
var vs = vertices.ToArray();
|
||||||
_line.SetPositions(vs);
|
_line.SetPositions(vs);
|
||||||
root.wrjManager.currentWRJ.wayPoints = vertices;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CorrectDirection()
|
private void CorrectDirection()
|
||||||
|
|
|
@ -104,7 +104,7 @@ public class ToolsBootstrap : MonoSingleton<ToolsBootstrap>
|
||||||
mCamera.transform.eulerAngles = new Vector3(45.8f, -13f, 0f);
|
mCamera.transform.eulerAngles = new Vector3(45.8f, -13f, 0f);
|
||||||
mCamera.orthographic = false;
|
mCamera.orthographic = false;
|
||||||
tapGesture.SetLayerMask(1 << 10);
|
tapGesture.SetLayerMask(1 << 10);
|
||||||
wrjManager.currentWRJ.isAuto = false;
|
|
||||||
wrjManager.wrjMenuSetPanel.gameObject.SetActive(false);
|
wrjManager.wrjMenuSetPanel.gameObject.SetActive(false);
|
||||||
simpleCameraController.enabled = true;
|
simpleCameraController.enabled = true;
|
||||||
}
|
}
|
||||||
|
@ -113,18 +113,6 @@ public class ToolsBootstrap : MonoSingleton<ToolsBootstrap>
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
_fsm.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<HuoPaoController>());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SwitchState(int indexState)
|
public void SwitchState(int indexState)
|
||||||
|
@ -152,7 +140,6 @@ public class ToolsBootstrap : MonoSingleton<ToolsBootstrap>
|
||||||
isDistance = false;
|
isDistance = false;
|
||||||
_fsm.SetState(StateName.line);
|
_fsm.SetState(StateName.line);
|
||||||
SwitchSet2DMap(2);
|
SwitchSet2DMap(2);
|
||||||
wrjManager.currentWRJ.isAuto = true;
|
|
||||||
wrjManager.wrjMenuSetPanel.gameObject.SetActive(false);
|
wrjManager.wrjMenuSetPanel.gameObject.SetActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,11 +148,6 @@ public class ToolsBootstrap : MonoSingleton<ToolsBootstrap>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void StartDeduction()
|
public void StartDeduction()
|
||||||
{
|
{
|
||||||
//wrjManager.currentWRJ.isMove = true;
|
|
||||||
for (int i = 0; i < wrjManager.wRJControllers.Count; i++)
|
|
||||||
{
|
|
||||||
wrjManager.wRJControllers[i].SetMove();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ namespace AdamSync
|
||||||
//string palyerJoinRoom = "joinroom " + "";
|
//string palyerJoinRoom = "joinroom " + "";
|
||||||
//_ = SyncCreateRoom.SendMessageAsync(palyerJoinRoom);
|
//_ = SyncCreateRoom.SendMessageAsync(palyerJoinRoom);
|
||||||
gameObject.tag = "MainCamera";
|
gameObject.tag = "MainCamera";
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,8 +9,6 @@ namespace Assets.Zion.Scripts.Adam
|
||||||
{
|
{
|
||||||
public class WRJManager : MonoBehaviour
|
public class WRJManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
public List<WRJController> wRJControllers = new List<WRJController>();
|
|
||||||
public WRJController currentWRJ;
|
|
||||||
public RectTransform wrjMenuSetPanel;
|
public RectTransform wrjMenuSetPanel;
|
||||||
public RectTransform canvasRect;
|
public RectTransform canvasRect;
|
||||||
|
|
||||||
|
@ -27,16 +25,16 @@ namespace Assets.Zion.Scripts.Adam
|
||||||
RaycastHit hitInfo;
|
RaycastHit hitInfo;
|
||||||
if (Physics.Raycast(ray, out hitInfo, 1000))
|
if (Physics.Raycast(ray, out hitInfo, 1000))
|
||||||
{
|
{
|
||||||
if (hitInfo.collider.tag == "WRJ")
|
EquipmentCommon ec = hitInfo.collider.GetComponent<EquipmentCommon>();
|
||||||
|
if (ec != null && ec.isPlayer)
|
||||||
{
|
{
|
||||||
//Debug.Log("daadad");
|
if (hitInfo.collider.tag == "WRJ")
|
||||||
currentWRJ = hitInfo.collider.GetComponent<WRJController>();
|
{
|
||||||
if (!wRJControllers.Contains(currentWRJ))
|
wrjMenuSetPanel.localScale = Vector3.one;
|
||||||
wRJControllers.Add(currentWRJ);
|
Vector3 posItem = GetScreenPosition(hitInfo.collider.gameObject);
|
||||||
wrjMenuSetPanel.localScale = Vector3.one;
|
wrjMenuSetPanel.gameObject.SetActive(true);
|
||||||
Vector3 posItem = GetScreenPosition(hitInfo.collider.gameObject);
|
wrjMenuSetPanel.anchoredPosition = new Vector3(posItem.x + 100f, posItem.y, posItem.z);
|
||||||
wrjMenuSetPanel.gameObject.SetActive(true);
|
}
|
||||||
wrjMenuSetPanel.anchoredPosition = new Vector3(posItem.x + 100f, posItem.y, posItem.z);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue