예제 #1
0
 void FixedUpdate()
 {
     if (GameModeManager.IsTimeAttackMode())
     {
         ProcessAttackTimer();
     }
     else if (GameModeManager.IsTurnBaseMode())
     {
         ProcessTurnTimer();
     }
 }
예제 #2
0
    void Start()
    {
        slider.onValueChanged.AddListener((float f) =>
        {
            timeText.text = (PrefabManager.Instance.tbar.GetComponent <TimeController>().timeLimit).ToString() + "sec";
        });

        if (GameModeManager.IsTimeAttackMode())
        {
            slider.minValue = 2f;
            slider.maxValue = 180f;
            PrefabManager.Instance.tbar.GetComponent <TimeController>().timeLimit = 2;
        }
        else if (GameModeManager.IsTurnBaseMode())
        {
            slider.minValue = 2f;
            slider.maxValue = 15f;
            PrefabManager.Instance.tbar.GetComponent <TimeController>().timeLimit = 2;
        }
        timeText.text = "2 sec";
    }