public void GetOutOfVent() { if (!isInVent) { return; } sourceVent = null; isInVent = false; mainPlayer.isMovable = true; ventPanelObject.gameObject.SetActive(false); StartCoroutine("execVentingOut"); }
public void SetVentController(bool isUsingVent, VentController sVent = null, VentController[] vcArray = null) { if (isUsingVent == false) { ventPanelObject.gameObject.SetActive(false); return; } isInVent = true; sourceVent = sVent; originalTargetVents = vcArray; mainPlayer.isMovable = false; StartCoroutine("execVentingIn"); targetVents = vcArray; DisplayArrow(vcArray); ventPanelObject.gameObject.SetActive(true); }
public void SelectGotoVent(int dir) { // camera.lockToGameObject = targetVents[dir].gameObject; mainPlayer.TeleportTo(targetVents[dir].transform.position); int invertDir = (dir + 4) % 8; // Debug.Log(invertDir); VentController[] nvc = new VentController[8]; nvc[invertDir] = sourceVent; if (targetVents[dir] == sourceVent) { nvc = originalTargetVents; } targetVents = nvc; DisplayArrow(targetVents); }