Ejemplo n.º 1
0
    void CheckTimeUp()
    {
        if (currentSeconds >= goalTime)
        {
            var players = FindObjectsOfType <Player>();
            foreach (var player in players)
            {
                player.Freeze();
            }

            //Online game
            if (!GameManager.isLocalGame)
            {
                ClientInRoom.GoToVictoryScene();
            }
            //Local Game
            else
            {
                SceneLoader.instance.LoadVictoryScene();
            }
        }
        else
        {
            StartCoroutine(Timer());
        }
    }
Ejemplo n.º 2
0
    private void Update()
    {
        ms += (Time.deltaTime * 1000d);

#if UNITY_EDITOR
        if (Input.GetKeyDown(KeyCode.Y) && state == inRoomState)
        {
            ClientInRoom.GoToVictoryScene();
        }
#endif
    }