Beispiel #1
0
    public void PlayCountDown(Action callback = null, int round = 0, string message = "", bool isShowSound = true)
    {
        GameObject     countObject = Utils.Spawn(CountDownPrefab, CountDownRoot);
        CountDownPanel countDown   = countObject.GetComponent <CountDownPanel>();

        countDown.Init(callback, round, message, isShowSound);
    }
Beispiel #2
0
    private void Awake()
    {
        _countDownPanel = this.GetComponentInParent <CountDownPanel>();
        _tween          = this.transform.DOScale(1.2f, 0.5f).From(0.7f).SetAutoKill(false).SetLoops(2, LoopType.Yoyo).SetEase(Ease.OutCubic);
        _tween.Rewind();

        _fadeTween             = _text.DOFade(0, 0.5f).From(1).SetAutoKill(false).SetEase(Ease.OutExpo).SetDelay(1f);
        _fadeTween.onComplete += _countDownPanel.ListenAnimationEnded;
        _fadeTween.Rewind();
    }
Beispiel #3
0
    private void OnShowTutorialResponse()
    {
        AudioManager.StopMusic();
        KinectInputModule.Instance.AllowUpdate = false;
        GameObject     countObject = Utils.Spawn(CountDownPrefab, CountDownRoot);
        CountDownPanel countDown   = countObject.GetComponent <CountDownPanel>();

        countDown.Init(OnCountdownResponse, 1, "", false);
        AudioManager.PlaySound(CounGo);
    }
    IEnumerator StartWithCountdown()
    {
        Time.timeScale = 0;
        CountDownPanel.SetActive(true);

        for (int i = 1; i <= 3; i++)
        {
            yield return(new WaitForSecondsRealtime(0.6f));

            countdownText.text = "" + (3 - i);
        }

        countdownText.text = "";
        CountDownPanel.SetActive(false);
        levelCountIcon[0].SetActive(true);
        hasStarted     = true;
        Time.timeScale = 1;
    }
 private void Awake()
 {
     Instance = this;
 }