private void OnTriggerStay(Collider other) { Squad.Core C = other.GetComponent <Core>().currentSquad; if (C != null && !SelectedCores.Contains(C)) { SelectedCores.Add(C); } }
public MeshLinkDetector Avaiable(Squad.Core newSquad) { if (inWait.Count < maxSquadCount) { inWait.Add(newSquad); return(this); } return(null); }
public bool AllowSquadsIn(Squad.Core core) { if (!onPlatformList.Contains(core)) { StartCoroutine(delayEnterState(core)); onPlatformList.Add(core); return(true); } return(false); }
public void GetElevatorInformation(Squad.Core core, OffMeshLink link, Vector3 startPos) { Elevator.Elevator mainPart = link.GetComponent <Elevator.MeshLinkDetector>().main; core.mainPart = mainPart; if (link.startTransform.position == startPos) { core.entry = GetLevel(mainPart, link.startTransform.position); core.exit = GetLevel(mainPart, link.endTransform.position); } else { core.entry = GetLevel(mainPart, link.endTransform.position); core.exit = GetLevel(mainPart, link.startTransform.position); } if (core.entry != core.exit || mainPart != null) { core.toUseElevator = true; } }
//Delays IEnumerator delayEnterState(Squad.Core squadCore) { yield return(0); squadCore.elevatorUse = Squad.ElevatorUseState.Enter; }
public void EnterOnElevator(Squad.Core core, Elevator.Elevator mainPart) { core.curWaypoint = mainPart.platform.position; }
public void AddToWaitList(Elevator.Elevator mainPart, int level, Squad.Core core) { mainPart.linkPoints[level].GetComponent <Elevator.MeshLinkDetector>().inWait.Add(core); }