예제 #1
0
    public IEnumerator ActivateFullBonus()
    {
        for (int i = 0; i < 6; i++)
        {
            RaycastHit hit;

            if (Physics.Raycast(transform.position, -Vector3.up, out hit, 5f))
            {
                pr = hit.transform.gameObject.GetComponentInParent <PlatformRandomRotate>();
                Instantiate(destroyPartical, pr.transform.position, Quaternion.identity);
                audioManager.PlaySound(touchSound[0]);
                pr.DestroyPlatform();
                rb.velocity = new Vector3(0, -5, 0);
                bonus++;
                CheckScore();
                isActivate = false;

                //pr = hit.transform.gameObject.GetComponent<PlatformRandomRotate>();
            }
            yield return(new WaitForSeconds(0.1f));
        }
    }
예제 #2
0
 private void Awake()
 {
     platformFull = GetComponentInParent <PlatformRandomRotate>();
     mc           = GetComponent <MeshCollider>();
 }