示例#1
0
 private void OnEnable()
 {
     _dimmer.DOFade(0.45f, 0.5f);
     _icon.transform.DOScale(1.9f, 0.5f);
     TimeInSeconds = 3f;
     StartCoroutine(MihyazDelay.WaitUntilThis(Countdown));
 }
示例#2
0
    private void Start()
    {
        _gameTimeCo = MihyazDelay.WaitUntilThis(Countdown);
        _clientsCo  = MihyazDelay.WaitUntilThis(CheckIfEverbodyConnected);

        StartCoroutine(_clientsCo);

        UI.IPv4Viewer.ViewIPv4(Server.GetIPv4Adress());
        UI.IPv4Viewer.StartGlowEyes();

        OnGameStart += () =>
        {
            StartCoroutine(_gameTimeCo);
            StopCoroutine(_clientsCo);
        };
        OnGameFinish += () =>
        {
            StopCoroutine(_gameTimeCo);
            for (int i = 0; i < 4; i++)
            {
                AllPlayers[i].enabled = false;
            }
        };
    }