Example #1
0
    void OnTriggerExit(Collider other)
    {
        BeybladePiece piece = other.GetComponent <BeybladePiece>();

        if (piece)
        {
            m_parent.ResetCollision();
            piece.m_parent.ResetCollision();
        }
    }
Example #2
0
    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();
    }