Пример #1
0
    void OnMouseDown()
    {
        this.audio.Play();

        choice += 1;

        switch (choice)
        {
        case 1:
            page01.move();
            break;

        case 2:
            page02.move();
            break;

        case 3:
            page03.move();
            break;

        case 4:
            page04.move();
            break;

        case 5:
            Application.LoadLevel("mainMenu");
            break;
        }
    }
Пример #2
0
    void OnMouseDrag()
    {
        currentScreenPoint = new Vector3(Input.mousePosition.x, Input.mousePosition.y, screenPoint.z);
        currentPos         = Camera.main.ScreenToWorldPoint(currentScreenPoint);
        if (lastPos.x > currentPos.x && newTouch == true)
        {
            switch (choice)
            {
            case 1:
                page01.move();
                newTouch           = false;
                transform.position = new Vector3(0, 0, 0);
                break;

            case 2:
                page02.move();
                newTouch           = false;
                transform.position = new Vector3(0, 0, 0);
                break;

            case 3:
                page03.move();
                newTouch           = false;
                transform.position = new Vector3(0, 0, 0);
                break;

            case 4:
                page04.move();
                newTouch           = false;
                transform.position = new Vector3(0, 0, 0);
                break;

            case 5:
                Application.LoadLevel("mainMenu");
                break;
            }
        }
    }