Exemplo n.º 1
0
 void OnTriggerEnter(Collider target)
 {
     if (triggerIndex == 1) {
         if (target.gameObject.tag == "Player") {
             if (camView == CubeLevel.Front) {
                 camView = CubeLevel.Clock;
             }
     //				trigger7to1.SetActive (true);
             this.GetComponentInParent<GameStateManagement> ().levelState = camView;
             trigger1to7Spawned = false;
             //disabling ability to go back into frontview for now
             Destroy (this.gameObject);
         }
     } else if (triggerIndex == 2) {
     //			if (target.gameObject.tag == "Player") {
     //
     //				if (camView == CubeLevel.Clock) {
     //					camView = CubeLevel.Front;
     ////					trigger7to1.SetActive (true);
     //					this.GetComponentInParent<GameStateManagement> ().levelState = camView;
     //					trigger1to7Spawned = false;
     //				}
     //			}
     }
 }
Exemplo n.º 2
0
 void Update()
 {
     currentIndex = this.GetComponentInParent<GameStateManagement> ().levelState;
     //		if (Input.GetKeyUp (KeyCode.Space)) {
     //			iterateUpwards ();
     //		}
     //		if (Input.GetKeyUp (KeyCode.Alpha3)) {
     //			iterateDownwards ();
     //		}
 }
Exemplo n.º 3
0
    void Start()
    {
        _mr.Clear();

        cb = GetComponent <CubeLevel>();

        _mr.AddRange(gameObject.GetComponentsInChildren <MeshRenderer>());


        for (int i = 0; i < _mr.Count; i++)
        {
            _mr[i].enabled = false;                           // 메시랜더러 다 끈 상태로
        }
        for (int i = 0; i < (int)CubeLevel.CubeLv.Count; i++) // 자녀의 갯수만큼 for 돌리면서 해당 오브젝트의 해등 레벨꺼만 킴.
        {
            if (i == (int)cb.cubeLv)
            {
                _mr[i].enabled = true;
            }
        }
    }
Exemplo n.º 4
0
    // Start is called before the first frame update
    void Start()
    {
        Instance = this;

        //(int)cubeLv =
    }
Exemplo n.º 5
0
	void masterControl ()
	{
		if (Input.GetKeyUp (KeyCode.Alpha0)) {
			levelState = CubeLevel.Start;
		}
		if (Input.GetKeyUp (KeyCode.Alpha1)) {
			levelState = CubeLevel.Front;
		}
		if (Input.GetKeyUp (KeyCode.Alpha2)) {
			levelState = CubeLevel.Left;
		}
		if (Input.GetKeyUp (KeyCode.Alpha7)) {
			levelState = CubeLevel.Clock;
		}
	}
Exemplo n.º 6
0
	void clockViews ()
	{
		if (this.GetComponentInChildren<Present1Level> ().progressToNextLevel == true && triggerState != 2) {
			if (Input.GetKeyUp (KeyCode.B)) {
				levelState = CubeLevel.Clock;
			}
		}
	}
Exemplo n.º 7
0
	void iterateState ()
	{
		if (levelState == 0) {
			//if (this.GetComponentInChildren<StartPageLevel> ().page == 1) {
			if (this.GetComponentInChildren<triggerRotate> ().bumpTriggered && Input.GetKeyUp (KeyCode.UpArrow)) {
				levelState += 1;
			}
			//}
		}
		//trigger state is controlling transition from levelstate front to levelstate left
		if (triggerState == 2) {
			levelState = CubeLevel.Left;
		}

		if (this.GetComponentInChildren<Past1Level> ().doorOpenToMoveOn) {
			this.levelState = CubeLevel.ClockLeft;
			demoEnd = true;
			//this.GetComponentInChildren<CameraDepthIteration>()
		}


		if (testMode == true) {
			masterControl ();
		}

	}
Exemplo n.º 8
0
 void Update()
 {
     camView = this.GetComponentInParent<GameStateManagement> ().levelState;
 }