Beispiel #1
0
    public void OnMouseDown()
    {
        //Rotate the cube and call the cube turned event.

        rotating = true;
        GetComponent <AudioSource> ().Play();

        StartCoroutine(OverTime.Rotate(transform, new Vector3(-90, 0, 0), rotationDuration, AfterRotate));
    }
Beispiel #2
0
    private void OnMouseDown()
    {
        if (rotating)
        {
            return;
        }

        rotating = true;
        GetComponent <AudioSource> ().Play();

        StartCoroutine(OverTime.Rotate(transform, new Vector3(0, 360 / statesOfRotation, 0), rotationDuration, UpdateRotation));
    }