コード例 #1
0
    public void timeUp()
    {
        StartCoroutine(EndWait());
        IsTimeUp   = false;
        StartTimer = false;
        timeBar.SetActive(false);
        TimeUpPanel.SetActive(true);
        CoinCountPanel.SetActive(false);
        coins.text   = "" + MiniGameRewards.score.ToString();
        coinsCW.text = "" + MiniGameRewards.coinCW.ToString();
        coinsMG.text = "" + MiniGameRewards.coinMG.ToString();

        GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Shooter>().enabled = false;


        //Objectives

        if (gs.score30 == 1 && MiniGameRewards.score >= 30 && gs.levelTwo.interactable == true)
        {
            gs.score30 = 2;
        }

        if (gs.score50 == 1 && MiniGameRewards.score >= 50 && gs.levelThree.interactable == true)
        {
            gs.score50 = 2;
        }
        if (gs.score100 == 1 && MiniGameRewards.score >= 100 && gs.levelFour.interactable == true)
        {
            gs.score100 = 2;
        }
    }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     Transform.FindObjectOfType <BarrelManager>();
     IfMiniGame = false;
     CoinCountPanel.SetActive(false);
     timeBar.SetActive(false);
     TimeUpPanel.SetActive(false);
     Clock.SetActive(false);
 }
コード例 #3
0
    public void Timer1()
    {
        timeBar.SetActive(true);
        CoinCountPanel.SetActive(true);
        CountDownTime -= Time.deltaTime;
        int countDown = (int)CountDownTime;

        Timer.text = "" + countDown;
        if (countDown <= 0f)
        {
            IsTimeUp = true;
        }
        if (countDown > 0 && countDown <= 30f)
        {
            Clock.SetActive(true);
        }
    }