コード例 #1
0
    // Update is called once per frame
    void ApplyTimer(float _timer)
    {
        float timeRate = G20_Timer.GetInstance().CurrentTime / G20_Timer.GetInstance().FirstTime;

        UIDonatu.fillAmount = timeRate;

        string timeStr = string.Format("{0:0.0}", _timer);

        UItext.text = timeStr;
    }
コード例 #2
0
    public void IngameStart()
    {
        var stageType = G20_GameManager.GetInstance().gameDifficulty;

        if (stageType >= stageBehaviourPrefabs.Length)
        {
            stageType = 0;
        }
        var stageObj = Instantiate(stageBehaviourPrefabs[(int)stageType], transform);

        nowStageBehaviour = stageObj.GetComponent <G20_StageBehaviour>();
        float stageTotalTime = nowStageBehaviour.stageTotalTime;

        G20_Timer.GetInstance().StartTimer(stageTotalTime);
    }
コード例 #3
0
 // Use this for initialization
 void Update()
 {
     ApplyTimer(G20_Timer.GetInstance().CurrentTime);
 }