Esempio n. 1
0
    private void CheckDone()
    {
        Vector3[] handWorldCoords = new Vector3[4], canvasWorldCoords = new Vector3[4];
        handRect.GetWorldCorners(handWorldCoords);
        canvasRect.GetWorldCorners(canvasWorldCoords);

        float handRight = handWorldCoords[2].x, canvasLeft = canvasWorldCoords[0].x;

        if (xSpeed == 0 || canvasLeft > handRight)
        {
            started = false;
            sceneLoader.LoadNext();
            eraseSound.Stop();
        }
    }