예제 #1
0
    void Update()
    {
        otherExit = otherScript.r;
        paused    = GManager.paused;
        countDown = GManager.Counting;

        if (!countDown && !paused)
        {
            t += Time.deltaTime;
        }

        if (t >= 60 && !paused && !countDown && levelCount <= 3)
        {
            BonusBall.GetComponent <BonusReachExit>().MoveSpeed++;
            MoveSpeed += 2;
            levelCount++;
            //LevelCount.enabled = true;
            //LevelCount.text = "LEVEL " + levelCount;
            t = 0;
        }

        nav.speed = MoveSpeed;
        nav.SetDestination(exit [r].position);
        CheckPause();
        CheckReach();
    }
예제 #2
0
	// Use this for initialization
	void Start () {
		brickManager = GameObject.FindObjectOfType<BrickManager> ();
		scoreBoardManager = GameObject.FindObjectOfType<ScoreBoardManager> ();
		GameObject[] popupObjects = GameObject.FindGameObjectsWithTag ("Popup");
		foreach (GameObject popupObject in popupObjects) {
			if (popupObject.name == "GameOverPopup") {
				gameOverPopup = popupObject;
				gameOverPopup.SetActive (false);
			} else if (popupObject.name == "StartPopup") {
				startPopup = popupObject;
			}
		}

		bonusBallPrefab = Resources.Load("Prefab/BonusBall", typeof(BonusBall)) as BonusBall; 
	}
예제 #3
0
    void OnTriggerEnter(Collider Other)
    {
        temp = r;

        if (Other.tag == "PlayerWall")
        {
            while (temp == r || otherExit == r || BonusBall.GetComponent <BonusReachExit>().r == r)
            {
                r = Random.Range(0, 5);
            }
        }

        if (Other.tag == "Finish")
        {
            reached = true;
            GameController.SetActive(false);
            RunnerTwo.SetActive(false);
            BonusBall.SetActive(false);
            gameObject.SetActive(false);
        }
    }
 public void AddBonusBalls(BonusBall bonusBall1, BonusBall bonusBall2)
 {
 }
 public void AddBonusBalls(BonusBall bonusBall1, BonusBall bonusBall2)
 {
     _bonusBall  = bonusBall1;
     _bonusBall2 = new BonusBall(0);
 }
 public void AddBonusBalls(BonusBall bonusBall1, BonusBall bonusBall2)
 {
     _bonusBall  = bonusBall1;
     _bonusBall2 = bonusBall2;
 }