Пример #1
0
        public void StartGame()
        {
            if (state != LandManagerState.idle)
            {
                throw new Exception("Trying to start a game twice.");
            }

            state = LandManagerState.loading;

            land = new Land(14);
            //activeBox = new LandActiveBox(land, world, new Point(600, 600));
            //landCamera = activeBox.camera;

            //LandCameraControl control = new LandCameraControl(land, landCamera);
            //HumanPlayer human = new HumanPlayer(land);

            //PlayerManager.getPlayer("player1").addControlable(human);

            //control.setAnchor(human);

            //land.addContentRequirer(human);
            //land.addUpdateNode(human);

            minimap          = new MapPreviewer(this.world, land, new Vector2(400f, 400f));
            minimap.position = UserInterfaceManager.getCurrentLowerLeftCorner() + UserInterfaceManager.getDiagonalOnWorld() / 2f + new Vector2(0f, -20f);

            minimapLoopAnimation = new LoopingAnimation(world, minimap, minimap.position, minimap.position, minimap.rotation, minimap.rotation, new Vector2(395f, 395f), new Vector2(400f, 400f), 5f, LoopingAnimation.InterpolationType.Trignometric, true, 0f);

            //activeBox.position.X = UserInterfaceManager.getCurrentUpperLeftCorner().X + 200f + 300f;

            land.loadMap();
            loadPreviewer          = new LandLoadPreviewer(world, land);
            loadPreviewer.position = new Vector2(0f, 220f);
        }
Пример #2
0
        public void StartGame()
        {
            if (state != LandManagerState.idle)
                throw new Exception("Trying to start a game twice.");

            state = LandManagerState.loading;

            land = new Land(14);
            //activeBox = new LandActiveBox(land, world, new Point(600, 600));
            //landCamera = activeBox.camera;

            //LandCameraControl control = new LandCameraControl(land, landCamera);
            //HumanPlayer human = new HumanPlayer(land);

            //PlayerManager.getPlayer("player1").addControlable(human);

            //control.setAnchor(human);

            //land.addContentRequirer(human);
            //land.addUpdateNode(human);

            minimap = new MapPreviewer(this.world, land, new Vector2(400f, 400f));
            minimap.position = UserInterfaceManager.getCurrentLowerLeftCorner() + UserInterfaceManager.getDiagonalOnWorld()/2f + new Vector2(0f,-20f);

            minimapLoopAnimation = new LoopingAnimation(world, minimap, minimap.position, minimap.position, minimap.rotation, minimap.rotation, new Vector2(395f,395f), new Vector2(400f,400f), 5f, LoopingAnimation.InterpolationType.Trignometric, true, 0f);

            //activeBox.position.X = UserInterfaceManager.getCurrentUpperLeftCorner().X + 200f + 300f;

            land.loadMap();
            loadPreviewer = new LandLoadPreviewer(world, land);
            loadPreviewer.position = new Vector2(0f, 220f);
        }