コード例 #1
0
ファイル: GameController.cs プロジェクト: xeppaka/mPuzzle-WP
        public void digout(IDictionary <string, object> state)
        {
            for (int i = 0; i < elementsX * elementsY; ++i)
            {
                randomMask[i, 0] = (int)state["randMask" + i];
            }
            gameViewController.setRandomization(randomMask);

            selFromX       = (int)state["selFromX"];
            selToX         = (int)state["selToX"];
            selFromY       = (int)state["selFromY"];
            selToY         = (int)state["selToY"];
            lastSelOneItem = (bool)state["lastSelOneItem"];
            lastSelX       = (int)state["lastSelX"];
            lastSelY       = (int)state["lastSelY"];
            mseconds       = (long)state["mseconds"];
            startTime      = mseconds;
            moves          = (int)state["moves"];
            inputState     = (InputState)state["inputState"];
            assembled      = (bool)state["assembled"];

            if (!assembled)
            {
                gameViewController.shadowViews();
            }
        }
コード例 #2
0
ファイル: GameController.cs プロジェクト: xeppaka/mPuzzle-WP
        public GameController(int elx, int ely, Puzzle p, GameViewController gvc, IPuzzleGamePage pgp)
        {
            elementsX          = elx;
            elementsY          = ely;
            puzzle             = p;
            gameViewController = gvc;
            gamePage           = pgp;
            inputState         = InputState.RELEASED_NO_SELECTION;

            randomize(elx, ely);
            gameViewController.setRandomization(randomMask);

            assembled = false;

            startTime = 0;
            thread    = new GameThread(this);
        }
コード例 #3
0
ファイル: GameController.cs プロジェクト: xeppaka/mPuzzle-WP
        public GameController(int elx, int ely, Puzzle p, GameViewController gvc, IPuzzleGamePage pgp)
        {
            elementsX = elx;
            elementsY = ely;
            puzzle = p;
            gameViewController = gvc;
            gamePage = pgp;
            inputState = InputState.RELEASED_NO_SELECTION;

            randomize(elx, ely);
            gameViewController.setRandomization(randomMask);

            assembled = false;

            startTime = 0;
            thread = new GameThread(this);
        }