Ejemplo n.º 1
0
    void Start()
    {
        mSlidePuzzleScript = GameObject.Find("SlidePuzzle").GetComponent <SlidePuzzleScript>();
        mExamineScript     = GameObject.Find("ExaminePlane(S)").GetComponent <ExamineScript>();

        mCurrentArray = new int[ROW, COL] {
            { 8, 7, 0 },
            { 4, 5, 6 },
            { 1, 2, 3 }
        };

        mActualArray = new int[ROW, COL] {
            { 1, 2, 3 },
            { 4, 5, 6 },
            { 7, 8, 0 }
        };

        Region.width  = RECTWIDTH;
        Region.height = RECTHEIGHT;

        mIsComplete   = false;
        mTileInMotion = false;
        mTileSpeed    = 7.0f;
        mSlideTile    = false;
        mGetStartTime = false;
        mTileInMotion = false;

        mIsSwap = false;

        InputManager.TouchDownEvent += OnTouchDown;
        InputManager.TouchDragEvent += OnTouchDrag;
        InputManager.TouchUpEvent   += OnTouchUp;
    }
Ejemplo n.º 2
0
    void Start()
    {
        gameObject.GetComponent <MeshRenderer>().enabled = false;
        isTriggered = false;

        Player     = GameObject.Find("Player");
        MainCamera = GameObject.Find("Main Camera");
        FlashLight = GameObject.Find("Spotlight");

        mPlayerStatusScript = Player.GetComponent <PlayerStatusScript>();
        mPlayerController   = Player.GetComponent <PlayerController>();
        mCameraRayScript    = MainCamera.GetComponent <CameraRayScript>();
        mCrawlScript        = Player.GetComponent <CrawlScript>();
        mExamineScript      = GameObject.Find("CrawlExamine").GetComponent <ExamineScript>();

        AxisController[] axisControllerList = Player.GetComponents <AxisController>();
        for (int i = 0; i < axisControllerList.GetLength(0); i++)
        {
            if (axisControllerList[i].Name == "Right")
            {
                mAxisControllerRight = axisControllerList[i];
                break;
            }
        }
    }
Ejemplo n.º 3
0
    void Start()
    {
        mRotatePuzzleScript = GameObject.Find("RotatePuzzle").GetComponent <RotatePuzzleScript>();
        mExamineScript      = GameObject.Find("ExaminePlane(R)").GetComponent <ExamineScript>();

        //Region.width = RECTWIDTH;
        //Region.height = RECTHEIGHT;

        mHasRotateToDefault = new bool[COL] {
            false, false, false, false, false
        };
        mCurrentArray = new int[COL] {
            0, 0, 0, 0, 0
        };
        mActualArray = new int[COL] {
            3, 1, 1, 2, 7
        };

        mTurnCount     = MAXTURN;
        mAllHasRotated = false;
        mRotate        = false;
        mTileInMotion  = false;
        mIsComplete    = false;

        InputManager.TouchDownEvent += OnTouchDown;
        InputManager.TouchDragEvent += OnTouchDrag;
        InputManager.TouchUpEvent   += OnTouchUp;
    }
Ejemplo n.º 4
0
    void Start()
    {
        Player            = GameObject.Find("Player");
        mCamera           = GameObject.Find("Main Camera");
        mPlayerController = Player.GetComponent <PlayerController>();
        mExamineScript    = GameObject.Find("ExaminePlane(S)").GetComponent <ExamineScript>();
        mCameraRayScript  = mCamera.GetComponent <CameraRayScript>();

        InputManager.TouchDownEvent += OnTouchDown;
        InputManager.TouchDragEvent += OnTouchDrag;
        InputManager.TouchUpEvent   += OnTouchUp;
    }
Ejemplo n.º 5
0
 void Start()
 {
     mExamineScript      = GameObject.Find("/Floor 1/WesternDoor3/GameObject/Plane009/Right").GetComponent <ExamineScript>();
     mPlayerStatusScript = GameObject.Find("Player").GetComponent <PlayerStatusScript>();
     Key = GameObject.Find("Key");
 }
Ejemplo n.º 6
0
    void Start()
    {
        Player = GameObject.Find("Player");
        mPlayerStatusScript = Player.GetComponent <PlayerStatusScript>();
        mExamineScript      = GameObject.Find("ExaminePlane(D)").GetComponent <ExamineScript>();
        mPuzzleTimer        = GameObject.Find("DollPuzzle").GetComponent <PuzzleTimer>();

        mPlayerController = Player.GetComponent <PlayerController>();

        mDefaultRegion[0]  = Region;
        mDefaultRegion[1]  = Region2;
        mDefaultRegion[2]  = Region3;
        mDefaultRegion[3]  = Region4;
        mDefaultRegion[4]  = Region5;
        mDefaultRegion[5]  = Region6;
        mDefaultRegion[6]  = Region7;
        mDefaultRegion[7]  = Region8;
        mDefaultRegion[8]  = Region9;
        mDefaultRegion[9]  = Region10;
        mDefaultRegion[10] = Region11;

        mDefaultPosition[0]  = GameObject.Find("Cube 1").transform.position;
        mDefaultPosition[1]  = GameObject.Find("Cube 2").transform.position;
        mDefaultPosition[2]  = GameObject.Find("Cube 3").transform.position;
        mDefaultPosition[3]  = GameObject.Find("Cube 4").transform.position;
        mDefaultPosition[4]  = GameObject.Find("Cube 5").transform.position;
        mDefaultPosition[5]  = GameObject.Find("Cube 6").transform.position;
        mDefaultPosition[6]  = GameObject.Find("Cube 7").transform.position;
        mDefaultPosition[7]  = GameObject.Find("Cube 8").transform.position;
        mDefaultPosition[8]  = GameObject.Find("Cube 9").transform.position;
        mDefaultPosition[9]  = GameObject.Find("Cube 10").transform.position;
        mDefaultPosition[10] = GameObject.Find("Cube 11").transform.position;
        mDefaultPosition[11] = GameObject.Find("Empty Tile").transform.position;

        mOriginalArray = new int[ROW, COL] {
            { -1, 7, 6, -1 },
            { -1, 3, 10, -1 },
            { 11, 4, 2, 0 },
            { 1, 9, 5, 8 }
        };

        mCurrentArray = new int[ROW, COL] {
            { -1, 7, 6, -1 },
            { -1, 3, 10, -1 },
            { 11, 4, 2, 0 },
            { 1, 9, 5, 8 }
        };

        mActualArray = new int[ROW - 2, COL] {
            { -1, 10, 11, -1 },
            { -1, 8, 9, -1 }
        };

        mActualArray2 = new int[ROW - 2, COL] {
            { -1, 10, 11, -1 },
            { -1, 9, 8, -1 }
        };

        mActualArray3 = new int[ROW - 2, COL] {
            { -1, 11, 10, -1 },
            { -1, 8, 9, -1 }
        };

        mActualArray4 = new int[ROW - 2, COL] {
            { -1, 11, 10, -1 },
            { -1, 9, 8, -1 }
        };

        InputManager.TouchDownEvent += OnTouchDown;
        InputManager.TouchUpEvent   += OnTouchUp;
    }