Example #1
0
    private IEnumerator StartTurn()
    {
        State = MatchState.TurnChange;

        int chaser_i = turn_num % 2;

        //Tools.Log(string.Format("turn {0}: chaser is p{1}", turn_num, chaser_i));

        // Set chara roles
        charas[chaser_i].SetChaser();
        for (int i = 0; i < charas.Length; ++i)
        {
            if (i != chaser_i)
            {
                charas[i].SetRunner();
            }
        }

        // Flash chase screen
        TimeScaleManager.SetFactor(0, ui_timescale_id);
        match_ui.ShowChaseScreen(charas[chaser_i], charas[1 - chaser_i]);

        yield return(StartCoroutine(CoroutineUtil.WaitForRealSeconds(0.5f)));

        match_ui.HideChaseScreen(GetChaser(), GetRunner());
        TimeScaleManager.SetFactor(1, ui_timescale_id);

        turn_start_time = Time.timeSinceLevelLoad;
        State           = MatchState.InPlay;
    }
Example #2
0
 private IEnumerator Freeze(float frames = 3)
 {
     TimeScaleManager.SetFactor(0, freeze_timescale_id);
     for (int i = 0; i < frames; ++i)
     {
         yield return(null);
     }
     TimeScaleManager.SetFactor(1, freeze_timescale_id);
 }
Example #3
0
 public void UnPause()
 {
     paused = false;
     TimeScaleManager.SetFactor(1, timescale_id);
     pause_page.SetOut();
     if (resume_sound != null)
     {
         resume_sound.Play();
     }
 }
Example #4
0
 public void Pause()
 {
     paused = true;
     TimeScaleManager.SetFactor(0, timescale_id);
     pause_page.SetIn();
     if (pause_sound != null)
     {
         pause_sound.Play();
     }
 }