Ejemplo n.º 1
0
    IEnumerator Pause2SecondRunnerSlowEvent()//撞到小狗
    {
        TouchChickenSFX.PlayOneShot(_AudioClipManagers.SFX[1]);
        RunnerCollider.enabled       = false;
        _IsportGameController.SetRpm = false;
        if (_IsportGameController.CoinCount - 10 <= 0)
        {
            _IsportGameController.CoinCount = 0;
        }
        else
        {
            _IsportGameController.CoinCount = _IsportGameController.CoinCount - 10;
        }
        ChickObj.transform.Translate(Vector3.up * Time.deltaTime * 20, MissingPointObj.transform);
        MissingEffect.SetActive(true);
        TouchChaserTextObj.SetActive(true);
        CoinTextObj.enabled = true;
        _IsportGameController.RunnerAnimator.SetTrigger("Jump");
        _IsportGameController.PlayerObjList[0].GetComponent <SplineFollower>().followSpeed = 10;
        yield return(new WaitForSeconds(0.25f));

        TouchChickenSFX.PlayOneShot(_AudioClipManagers.SFX[3]);
        _IsportGameController.PlayerObjList[0].GetComponent <SplineFollower>().followSpeed = 5;//測試用
        yield return(new WaitForSeconds(1.75f));

        TouchChaserTextObj.SetActive(false);
        CoinTextObj.enabled = false;
        MissingEffect.SetActive(false);
        _IsportGameController.SetRpm = true;
        RunnerCollider.enabled       = true;
    }
Ejemplo n.º 2
0
 void Awake()
 {
     //RunnerCollider = this.GetComponent<SphereCollider>();
     //MissingEffect = GameObject.Find("dizzy_effect");
     TouchParentTextObj.SetActive(false);
     TouchChaserTextObj.SetActive(false);
     CoinTextObj.enabled = false;
     MissingEffect.SetActive(false);
 }