示例#1
0
    public void Delay()
    {
        if (timer_text == null)
        {
            timer_text = GameObject.Find("Timer_Text").GetComponent <Text>();
        }

        player_script = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Movement>();

        if (bonus_stage == Bonus_Stage.Off)
        {
            start_time = 201;
            player_script.mystery_timer = 5.0f;
        }
        else
        {
            start_time = 31;
            player_script.mystery_timer = 33.0f;
            player_script.Mystery_Powerup();
        }

        GameObject.Find("Canvas").GetComponent <UI>().time       = start_time;
        GameObject.Find("Canvas").GetComponent <UI>().timer_text = timer_text;
    }