Ejemplo n.º 1
0
    void Start()
    {
        count = new CountingScript();
        ctrl  = GardenSceneController.Instance;

        /* Gets component rigidbody. */

        rigidbody2d = GetComponent <Rigidbody2D>();
        startingPos = rigidbody2d.position;

        if (ctrl.finishedPuzzle() && this.tag != "Patsas3")
        {
            startingPos = ctrl.getSavedPosition(this.tag);
            rigidbody2d.MovePosition(startingPos);
        }

        if (x)
        {
            temp = count.countDiversition(goalPosition, startingPos.x);
        }
        else
        {
            temp = count.countDiversition(goalPosition, startingPos.y);
        }
    }
    private void Start()
    {
        ctrl = GardenSceneController.Instance;

        if (ctrl.finishedPuzzle())
        {
            Destroy(this);
        }
    }
    private GameController()
    {
        gardenCtrl  = GardenSceneController.Instance;
        machineCtrl = MachineSceneController.Instance;

        gardenFinished = false;

        int[,] startingPoints = new int[, ] {
            { 0, 0 }, { 0, 84 },           /* Tutorial scene. 0 - 1 */
            { 0, -7 }, { 9, 6 },           /* Machine scene. 2 - 3 */
            { 227, 91 }, { 216, 210 },     /* Music scene. 4 - 5 */
            { 8, -12 }                     /* Garden scene. 6 */
        };
        x        = 0; y = 0;
        lastRoom = "";
    }