コード例 #1
0
 public void GetOutOfVent()
 {
     if (!isInVent)
     {
         return;
     }
     sourceVent           = null;
     isInVent             = false;
     mainPlayer.isMovable = true;
     ventPanelObject.gameObject.SetActive(false);
     StartCoroutine("execVentingOut");
 }
コード例 #2
0
 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);
 }
コード例 #3
0
    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);
    }