Esempio n. 1
0
    public IEnumerator StartTimer(int time)
    {
        if (time != 0)
        {
            CurrentTime = time;
            GameState state     = controller.game.State.CurrentState;
            var       last_tick = PhotonNetwork.Time;
            while (CurrentTime > 0 && state == controller.game.State.CurrentState)
            {
                yield return(null);

                var now = PhotonNetwork.Time;
                CurrentTime -= (float)(now - last_tick);
                last_tick    = now;
            }
            CurrentTime = 0f;
            if (state == controller.game.State.CurrentState)
            {
                PhotonNetwork.RaiseEvent(12, null, controller.RaiseEventOptions, controller.SendOptions);
                switcher.GoCommon();
                controller.MinePlayer.GetReady();
            }
        }
    }
Esempio n. 2
0
 public void SwitchBack()
 {
     switchCanvas.GoCommon();
 }