IEnumerator Dash() { // Start of Dash b.PlaySound(2, 0.7f); rb.velocity = rb.velocity * dashMultiplier; b.DisablePlayerInfluence(); yield return(new WaitForSeconds(dashTime)); b.EnablePlayerInfluence(); }
IEnumerator FreezeFrame3D(Beyblade p1, Beyblade p2, Vector3 bounceBack) { ResetLight(); p1.GetComponent <ClashEventModule>().enabled = false; p2.GetComponent <ClashEventModule>().enabled = false; //Unfreeze physics p1.GetComponentInChildren <MovementControls>().enabled = true; p1.GetComponentInChildren <TiltControls>().enabled = true; p2.GetComponentInChildren <MovementControls>().enabled = true; p2.GetComponentInChildren <TiltControls>().enabled = true; //TODO: Hard Coded Value p1.BounceBack(p2, bounceBack, 200); //UnFocus Camera m_cam.ResetCameras(); //Disable Shield p1.GetComponent <ShieldController>().enabled = false; p2.GetComponent <ShieldController>().enabled = false; yield return(new WaitForSeconds(m_delayTransition)); //Enable Pieces p1.EnableBeybladePieces(); p2.EnableBeybladePieces(); //Enable Controls p1.EnablePlayerInfluence(); p2.EnablePlayerInfluence(); //Reset Collision p1.ResetCollision(); p2.ResetCollision(); }