using UnityEngine; namespace WS { [ObjectSystem] public class TeleportPointControllerAwakeSystem : AwakeSystem { public override void Awake(TeleportPointController self) { self.RefreshTeleport(); } } [ObjectSystem] public class TeleportPointControllerUpdataSystem : UpdateSystem { public override void Update(TeleportPointController self) { //if (GameManager.Instance.Data.Pattern != PatternType.引导) //{ // if (VRInputComponent.Instance.Getkey(VRKey.圆盘, VRHand.Any)) // { // self.ShowTeleportTarget(true); // } // else // { // self.ShowTeleportTarget(false); // } //} } } public class TeleportPointController : WSComponent { //public TeleportTargetBase[] points; public GameObject[] UnMoveAreas; public void RefreshTeleport() { //points = GameObject.FindObjectsOfType(); //UnMoveAreas = GameObject.FindGameObjectsWithTag("UnMoveArea"); //for (int i = 0; i < points.Length; i++) //{ // points[i].GetComponent().enabled = false; // points[i].GetComponent().enabled = false; //} //for (int i = 0; i < UnMoveAreas.Length; i++) //{ // UnMoveAreas[i].GetComponent().enabled = false; //} } public void ShowTeleportTarget(bool isShow) { //points = GameObject.FindObjectsOfType(); //UnMoveAreas = GameObject.FindGameObjectsWithTag("UnMoveArea"); //for (int i = 0; i < points.Length; i++) //{ // if (points[i]==null) // { // return; // } // points[i].GetComponent().enabled = isShow; // points[i].GetComponent().enabled = isShow; //} //for (int i = 0;i < UnMoveAreas.Length; i++) //{ // UnMoveAreas[i].GetComponent().enabled =isShow; //} } public void InitTeleportArea() { //for (int i = 0; i < points.Length; i++) //{ // points[i].GetComponent().enabled = false; // points[i].GetComponent().enabled = false; //} //for (int i = 0; i < UnMoveAreas.Length; i++) //{ // UnMoveAreas[i].GetComponent().enabled = false; //} } public override void Dispose() { base.Dispose(); //points = null; } } }