Ejemplo n.º 1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            var anteater    = Content.Load <Texture2D>("anteater");
            var leaftexture = Content.Load <Texture2D>("leaf");
            var homeTexture = Content.Load <Texture2D>("home");
            var antTexture  = Content.Load <Texture2D>("ant80");

            _backgroundGrassTexture = Content.Load <Texture2D>("ground");

            _leaf    = new Leaf(leaftexture, 1024, 720);
            _antHome = new Home(homeTexture, 1024, 720);
            _lilAnt  = new LilAnt(antTexture, new Vector2(100, 100))
                       .AddHome(_antHome)
                       .AddLeaf(_leaf);

            _gameManager.AddObject(_lilAnt);
            _gameManager.AddObject(_leaf);
            _gameManager.AddObject(_antHome);

            Mouse.SetCursor(MouseCursor.FromTexture2D(anteater, 40, 40));

            // Create a new SpriteBatch, which can be used to draw textures.
            _spriteBatch = new SpriteBatch(GraphicsDevice);
            _gameManager.LoadObjects(Content);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            sphereModel = Content.Load <Model>("Sphere");

            earthTexture   = Content.Load <Texture2D>("earthTexture");
            lunaTexture    = Content.Load <Texture2D>("lunaTexture");
            mercuryTexture = Content.Load <Texture2D>("mercuryTexture");

            mouse = Content.Load <Texture2D>("mouse");

            // Special textures used for sun shader
            noise = Content.Load <Texture2D>("noise");
            ramp  = Content.Load <Texture2D>("ramp");

            sunEffect        = Content.Load <Effect>("DisplacementEffect");
            standardLighting = Content.Load <Effect>("StandardShading");

            Camera camera = new Camera();

            // Fill dictonary
            solarBodies.Add(earthTransform, earthTexture);
            solarBodies.Add(lunaTransform, lunaTexture);
            solarBodies.Add(mercuryTransform, mercuryTexture);

            // Set the mouse
            Mouse.SetCursor(MouseCursor.FromTexture2D(mouse, 0, 0));
            this.IsMouseVisible = true;
        }
Ejemplo n.º 3
0
        protected override void Initialize()
        {
            _graphics.PreferredBackBufferWidth  = 800;
            _graphics.PreferredBackBufferHeight = 800;
            Window.IsBorderless = false;
            _graphics.ApplyChanges();

            int       cursorWidth = 5, cursorHeight = 5;
            Texture2D cursor = new Texture2D(GraphicsDevice, cursorWidth, cursorHeight);

            Color[] cursorData = new Color[cursorWidth * cursorHeight];
            for (int i = 0; i < cursorData.Length; i++)
            {
                cursorData[i] = Color.Red;
            }
            cursor.SetData(cursorData);

            Mouse.SetCursor(MouseCursor.FromTexture2D(cursor, 1, 1));

            Data.Cells = new Cell[Data.CellsX, Data.CellsY];

            Clear();

            base.Initialize();
        }
Ejemplo n.º 4
0
        public Results(Point screenDim, GraphicsDevice graphicsDevice, Texture2D quitButtonText, Texture2D menuButtonText, Texture2D mouseMenuPointer, HittingGame hittingGame, TrackerGame trackerGame, Texture2D freccia, Texture2D pentagono, Texture2D triangolo, SpriteFont font, Texture2D background, Texture2D help, Texture2D help_info, SoundEffect onButton, SoundEffect clickButton)
        {
            newMouse       = new MouseState(0, 0, 0, ButtonState.Released, ButtonState.Released, ButtonState.Released, ButtonState.Released, ButtonState.Released);
            quitRect       = new Rectangle(screenDim.X - quitButtonText.Width / 4, 0, quitButtonText.Width / 4, quitButtonText.Height / 4);
            menuRect       = new Rectangle(screenDim.X / 5 - menuButtonText.Width / 2, screenDim.Y / 4 - menuButtonText.Height / 2, menuButtonText.Width, menuButtonText.Height);
            helpRect       = new Rectangle(50, screenDim.Y - 3 * help.Height / 4 - 20, 3 * help.Width / 4, 3 * help.Height / 4);
            help_info_Rect = new Rectangle(-150, 450, help_info.Width, help_info.Height);           //position has to be changed, waiting for the new button
            graphicPos     = new Point(530 + screenDim.X / 2 - pentagono.Width / 2, screenDim.Y / 2 - 230);
            help_info_on   = false;

            helpButton = new Button(helpRect, help, Color.White, onButton, clickButton);
            quitButton = new Button(quitRect, quitButtonText, Color.White, onButton, clickButton);
            menuButton = new Button(menuRect, menuButtonText, Color.White, onButton, clickButton);

            filePath = @"SaveRecords.txt";

            Mouse.SetCursor(MouseCursor.FromTexture2D(mouseMenuPointer, mouseMenuPointer.Width / 2, mouseMenuPointer.Height / 2));
            hittingGame.endHittingGame += endHittingGameHandler;
            trackerGame.endTrackerGame += endTrackerGameHandler;
            this.freccia    = freccia;
            this.pentagono  = pentagono;
            this.triangolo  = triangolo;
            this.font       = font;
            this.background = background;
            this.help_info  = help_info;
        }
Ejemplo n.º 5
0
        public CursorManager(ContentManager content)
        {
            _crossHairCursor          = content.Load <Texture2D>("visual/gui/edna/cursor");
            _crossHairCursorActivated = content.Load <Texture2D>("visual/gui/edna/cursor_a");

            Mouse.SetCursor(MouseCursor.FromTexture2D(_crossHairCursor, 20, 20));
        }
Ejemplo n.º 6
0
 /// <summary>
 /// LoadContent will be called once per game and is the place to load
 /// all of your content.
 /// </summary>
 protected override void LoadContent()
 {
     // Create a new SpriteBatch, which can be used to draw textures.
     spriteBatch = new SpriteBatch(GraphicsDevice);
     _texture    = Content.Load <Texture2D>("heart");
     Mouse.SetCursor(MouseCursor.FromTexture2D(_texture, 0, 0));
 }
Ejemplo n.º 7
0
        public void Initialize(ContentManager Content)
        {
            BulletTexture = Content.Load <Texture2D>("Sprites/Bullet");

            CursorInfo = new CursorInfo(MouseCursor.FromTexture2D(Content.Load <Texture2D>("Sprites/CrossHair"), 0, 0), true);

            //Initialize map and camera
            mapRenderer = new TiledMapRenderer();
            camera      = new Camera(ScreenManager.GraphicsDevice);
            hubMap      = Map.LoadTiledMap(ScreenManager.GraphicsDevice, "Content/maps/hub.tmx");
            ScreenManager.Game.IsMouseVisible = false;

            //Create the player
            player = new Player(Content.Load <Texture2D>("Sprites/Player"), new Vector2(456, 456), hubMap, Content, ScreenManager);

            //Initialize some systems
            ParticleSystem.Instance.Initialize(Content);
            EntityManager.Instance.Initialize(player.playerController);
            hubMap.LoadObjects(ScreenManager);

            //Add new entities
            EntityManager.Instance.AddEntity(player);

            //Create player interface
            playerInterface = new PlayerInterface(player, Content, ScreenManager.GraphicsDevice);
            player.playerController.OnControlChanged += playerInterface.ChangeInterface;
        }
Ejemplo n.º 8
0
        public static MouseCursor[] LoadUpgradeCursors(GraphicsDevice gd, Stream stream, int maxStars)
        {
            var       cur = LoadCursor(gd, stream);
            Texture2D starTex;

            using (var str = File.Open("Content/uigraphics/upgrade_star.png", FileMode.Open, FileAccess.Read, FileShare.Read))
            {
                starTex = Texture2D.FromStream(gd, str);
            }

            var batch   = new SpriteBatch(gd);
            var results = new MouseCursor[maxStars];

            for (int i = 0; i < maxStars; i++)
            {
                var starPos = cur.Item1.Width - 12;
                var width   = Math.Max(starPos + 8 * i + 9, cur.Item1.Width);
                var tex     = new RenderTarget2D(gd, width, Math.Max(width, cur.Item1.Height));
                gd.SetRenderTarget(tex);
                gd.Clear(Color.Transparent);
                batch.Begin(SpriteSortMode.Immediate);
                batch.Draw(cur.Item1, Vector2.Zero, Color.White);
                for (int j = 0; j <= i; j++)
                {
                    batch.Draw(starTex, new Vector2(starPos, 5), Color.White);
                    starPos += 8;
                }
                batch.End();
                gd.SetRenderTarget(null);
                results[i] = MouseCursor.FromTexture2D(tex, cur.Item2.X, cur.Item2.Y);
            }
            starTex.Dispose();

            return(results);
        }
Ejemplo n.º 9
0
    public JG_Mouse(Vector2 pos, string spritePath, float rot, Vector2 scale) : base(pos, spritePath, rot, scale)
    {
        left  = new JG_ButtonState();
        right = new JG_ButtonState();
        MouseCursor cursor = MouseCursor.FromTexture2D(sprite, 0, 0);

        Mouse.SetCursor(cursor);
    }
Ejemplo n.º 10
0
        /// <summary>
        /// Pozwala grze na wykonanie dowolnej inicjalizacji przed uruchomieniem.
        /// W tym miejscu można wyszukiwać dowolne wymagane usługi (treści) i je załadować.
        /// </summary>
        protected override void Initialize()
        {
            Texture2D cursor = Content.Load <Texture2D>("Controls/cursor");

            Mouse.SetCursor(MouseCursor.FromTexture2D(cursor, 0, 0));
            IsMouseVisible = true;

            base.Initialize();
        }
Ejemplo n.º 11
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            cursorTexture = Content.Load <Texture2D>("comradeCursor");
            MouseCursor mouseCursor = MouseCursor.FromTexture2D(cursorTexture, 1, 2);

            Mouse.PlatformSetCursor(mouseCursor);

            plantTexture            = Content.Load <Texture2D>("plant");
            controlRodTexture       = Content.Load <Texture2D>("controlRod");
            controlRodTargetTexture = Content.Load <Texture2D>("controlRodTarget");
            turbineTexture          = Content.Load <Texture2D>("turbine");
            pumpTexture             = Content.Load <Texture2D>("pump");
            az5Texture = Content.Load <Texture2D>("AZ-5");
            //bubbleStripTexture = Content.Load<Texture2D>("bubbleStrip");
            bubbleTexture                 = Content.Load <Texture2D>("bubbleSmall");
            plantBubbleClipTexture        = Content.Load <Texture2D>("plantBubbleClip");
            reactivityMeterPromptTexture  = Content.Load <Texture2D>("reactivityMeterPrompt");
            reactivityMeterDelayedTexture = Content.Load <Texture2D>("reactivityMeterDelayed");
            reactivityMeterBarTexture     = Content.Load <Texture2D>("reactivityMeterBar");

            coreTempTexture      = Content.Load <Texture2D>("readout_coreTemp");
            seperatorTempTexture = Content.Load <Texture2D>("readout_separator");
            SteamTempTexture     = Content.Load <Texture2D>("readout_steamTemp");
            turbineSpeedTexture  = Content.Load <Texture2D>("readout_turbineSpeed");

            video      = Content.Load <Video>("Ending_film");
            videoStall = Content.Load <Video>("Stall_Ending_film");
            player     = new VideoPlayer();


            PowerBackgroundTexture        = Content.Load <Texture2D>("powerMeter_reactor");
            TurbinePowerBackgroundTexture = Content.Load <Texture2D>("powerMeter_turbine1");
            BlankNixieTexture             = Content.Load <Texture2D>("NixieOff");
            for (int i = 0; i < 10; i++)
            {
                PowerNixieTextures.Add(Content.Load <Texture2D>($"Nixie{i}"));
            }

            az5Rectangle = new Rectangle(2950, 650, az5Texture.Width, az5Texture.Height);

            defaultFont = Content.Load <SpriteFont>("Arial");
            niceFont    = Content.Load <SpriteFont>("Phosphate");
            //Create control rod instances and add to list of control rods
            for (int i = 0; i < 5; i++)
            {
                controlRods.Add(new ControlRod(new Rectangle(1498 + (i * 43), 761, 27, 810), new Point(controlRodTexture.Width, controlRodTexture.Height)));
            }

            pumpSliderKnobTexture       = Content.Load <Texture2D>("pump_control_anim");
            pumpSliderBackgroundTexture = Content.Load <Texture2D>("pump_control_background");

            pumpSlider = new PumpSlider(new Rectangle(2410 - pumpSliderKnobTexture.Width / 2, 22, pumpSliderKnobTexture.Width, pumpSliderKnobTexture.Height), 1549 - pumpSliderKnobTexture.Height / 2, 1198 - pumpSliderKnobTexture.Height / 2, (int)pump.PumpSpeedPercentage);
        }
Ejemplo n.º 12
0
 private void Load()
 {
     cursorList.Add(CursorType.POINTER, MouseCursor.FromTexture2D(content.Load <Texture2D>(@"Cursors/Pointer"), 0, 0));
     cursorList.Add(CursorType.HANDFINGER, MouseCursor.FromTexture2D(content.Load <Texture2D>(@"Cursors/HandFinger"), 8, 0));
     cursorList.Add(CursorType.HANDCLOSE, MouseCursor.FromTexture2D(content.Load <Texture2D>(@"Cursors/HandClose"), 8, 0));
     cursorList.Add(CursorType.ARROWHORIZONTAL, MouseCursor.FromTexture2D(content.Load <Texture2D>(@"Cursors/ArrowHorizontal"), 15, 0));
     cursorList.Add(CursorType.ARROWVERTICAL, MouseCursor.FromTexture2D(content.Load <Texture2D>(@"Cursors/ArrowVertical"), 0, 15));
     cursorList.Add(CursorType.ARROWDIAGONAL, MouseCursor.FromTexture2D(content.Load <Texture2D>(@"Cursors/ArrowDiagonal"), 11, 11));
     Mouse.SetCursor(cursorList[CursorType.POINTER]);
 }
Ejemplo n.º 13
0
        public MonoGameCustomCursor(Pixmap upPixmap, Pixmap downPixmap, int xHotspot, int yHotspot) : base()
        {
            base._init_(upPixmap, downPixmap, xHotspot, yHotspot);

            if (Mini2DxGame.instance.getConfig().IsMouseVisible.HasValue&&
                Mini2DxGame.instance.getConfig().IsMouseVisible.Value)
            {
                upCursor   = MouseCursor.FromTexture2D(((MonoGameTexture)Mdx.graphics_.newTexture(upPixmap)).texture2D, xHotspot, yHotspot);
                downCursor = MouseCursor.FromTexture2D(((MonoGameTexture)Mdx.graphics_.newTexture(downPixmap)).texture2D, xHotspot, yHotspot);
                Mouse.SetCursor(upCursor);
            }
        }
Ejemplo n.º 14
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            _spriteBatch = new SpriteBatch(GraphicsDevice);

            _cursorNormal  = MouseCursor.FromTexture2D(Content.Load <Texture2D>("cursor"), 0, 0);
            _cursorClicked = MouseCursor.FromTexture2D(Content.Load <Texture2D>("cursorAct"), 0, 0);
            Mouse.SetCursor(Mouse.GetState().LeftButton == ButtonState.Released
                ? _cursorNormal
                : _cursorClicked);


            GameStateManager.GlobalContent = Content;
            GameStateManager.SetGameState(new Title(this, GraphicsDevice));
        }
Ejemplo n.º 15
0
Archivo: Room1.cs Proyecto: jkapi/Kakoi
        public override void Initialize()
        {
            Mouse.Cursor      = MouseCursor.FromTexture2D(Content.Load <Texture2D>("transparant"), 0, 0);
            View.RotationMode = View.RotationType.Degrees;

            Arial12 = Content.Load <SpriteFont>("OpenSans13");
            Arial24 = Content.Load <SpriteFont>("arial24");
            Chips   = new Sprite(Content.Load <Texture2D>("chips"));
            Heads   = new Sprite(Content.Load <Texture2D>("random/heads"), 4);

            Board = new MainBoard(new Vector2(600, 32));

            Objects.Add(Board);
            Objects.Add(new Chatbox());
        }
Ejemplo n.º 16
0
        protected override void Initialize()
        {
            base.Initialize();

            graphics.PreferredBackBufferWidth  = GraphicsDevice.DisplayMode.Width;
            graphics.PreferredBackBufferHeight = GraphicsDevice.DisplayMode.Height;
            graphics.ApplyChanges();

            Content.RootDirectory = "Content";

            Mouse.SetCursor(MouseCursor.FromTexture2D(Content.Load <Texture2D>("images/cursor"), 0, 0));
            IsMouseVisible = true;

            InfoManager.Initialize(Content);
            GameLog.Initialize(Content);
            LineRenderer.Initialize(GraphicsDevice);
        }
Ejemplo n.º 17
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here

            player = new Player();

            projectiles = new List <Projectile>();

            camera = new Camera(GraphicsDevice.Viewport);

            IsMouseVisible = true;

            Mouse.SetCursor(MouseCursor.FromTexture2D(Content.Load <Texture2D>("Assets/Textures/cursor1"), 8, 8));


            base.Initialize();
        }
Ejemplo n.º 18
0
        public Pause(Point screenDim, GraphicsDevice graphicsDevice, Texture2D resumeButtonText, Texture2D menuButtonText, Texture2D exit, Texture2D mouseMenuPointer, Texture2D knobText, Texture2D slideText, SpriteFont font, float mouseSens, float volume, SoundEffect onButton, SoundEffect clickButton)
        {
            newMouse       = new MouseState(0, 0, 0, ButtonState.Released, ButtonState.Released, ButtonState.Released, ButtonState.Released, ButtonState.Released);
            rectDimensions = new Point(menuButtonText.Width, menuButtonText.Height);
            resumeRect     = new Rectangle(screenDim.X / 3 - rectDimensions.X / 2, screenDim.Y / 2 - rectDimensions.Y / 2, rectDimensions.X, rectDimensions.Y);
            menuRect       = new Rectangle(2 * (screenDim.X / 3) - rectDimensions.X / 2, screenDim.Y / 2 - rectDimensions.Y / 2, rectDimensions.X, rectDimensions.Y);
            backBuffer     = new int[screenDim.X * screenDim.Y];
            mouseScale     = 10; //max reachable value, for the volume is 1
            volumeSlide    = new Slider(new Point(screenDim.X / 3 - rectDimensions.X / 2, screenDim.Y / 2 + rectDimensions.Y), volume, slideText, knobText, font, "Volume: ", Color.White);
            sensSlide      = new Slider(new Point(2 * (screenDim.X / 3) - rectDimensions.X / 2, screenDim.Y / 2 + rectDimensions.Y), mouseSens / mouseScale, slideText, knobText, font, "Mouse sensibility: ", Color.White);

            exitButton   = new Button(new Rectangle(screenDim.X - exit.Width / 4, 0, exit.Width / 4, exit.Height / 4), exit, Color.White, onButton, clickButton);
            resumeButton = new Button(resumeRect, resumeButtonText, Color.White, onButton, clickButton);
            menuButton   = new Button(menuRect, menuButtonText, Color.White, onButton, clickButton);

            Mouse.SetCursor(MouseCursor.FromTexture2D(mouseMenuPointer, mouseMenuPointer.Width / 2, mouseMenuPointer.Height / 2));
        }
Ejemplo n.º 19
0
        /// <summary>
        /// Initialize Game;
        /// </summary>
        protected override void Initialize()
        {
            _graphics.PreferredBackBufferWidth  = Camera.SCREEN_WIDTH;
            _graphics.PreferredBackBufferHeight = Camera.SCREEN_HEIGHT;
            _graphics.ApplyChanges();

            ContentLoader.Instance.Initialize(Content);
            SoundManager.Instance.Initialize();
            TextureManager.Instance.Initialize();
            SpriteManager.Instance.Initialize(_graphics.GraphicsDevice);
            SoundManager.Instance.PlayMusic("background1");

            mouseActive = TextureManager.Instance.GetTexture("Mouse Active").Texture;
            Mouse.SetCursor(MouseCursor.FromTexture2D(mouseActive, mouseActive.Width / 2, mouseActive.Height / 2));

            base.Initialize();
        }
Ejemplo n.º 20
0
        public override void LoadContent()
        {
            _timerManager = new TimerManager();
            _timerManager.InitializeSounds(Content);
            _timerManager.GameStartSound();

            _font            = Content.Load <SpriteFont>("textures/ui/font");
            _alienTexture    = Content.Load <Texture2D>("textures/game/alien");
            _shootSound      = Content.Load <SoundEffect>("sounds/game/shoot");
            _alienDeathSound = Content.Load <SoundEffect>("sounds/game/explosion");

            Mouse.SetCursor(MouseCursor.FromTexture2D(Content.Load <Texture2D>("textures/game/crosshair"), 24, 24));

            _timerText  = new Title(_font, "", Title.TextAlign.Left, new Vector2(5, 5), Color.White);
            _alienCount = new Title(_font, "", Title.TextAlign.Left, new Vector2(5, 45), Color.White);

            base.LoadContent();
        }
Ejemplo n.º 21
0
        public void LoadContent()
        {
            // EntityFactory
            _entityFactory = new EntityFactory(_gameApp);
            _gameApp.Services.AddService <EntityFactory>(_entityFactory);

            // Map
            var mapInfo = new MapInfo(0, 0, GameApp.DefaultWidth, GameApp.DefaultHeight);

            _gameApp.Services.AddService <MapInfo>(mapInfo);

            // Camera
            var viewportAdapter = new ScalingViewportAdapter(_gameApp.GraphicsDevice, GameApp.DefaultWidth, GameApp.DefaultHeight);

            var camera = new OrthographicCamera(viewportAdapter);

            _gameApp.Services.AddService <OrthographicCamera>(camera);

            // Event Manager
            _eventManager = new EventManager();
            _gameApp.Services.AddService(_eventManager);

            // World
            _world = new WorldBuilder()
                     .AddSystem(new ChickenSpawnSystem(_gameApp))
                     .AddSystem(new ChickenDestroySystem(_gameApp))
                     .AddSystem(new ChickenHitSystem(_gameApp))
                     .AddSystem(new PlayerControlSystem(_gameApp))
                     .AddSystem(new PhysicsSystem())
                     .AddSystem(new AnimatedSpriteSystem())

                     .AddSystem(new RendererSystem(_gameApp))
                     .AddSystem(new RenderHudSystem(_gameApp))

                     .Build();

            _entityFactory.LoadContent(_world);

            // Background
            BuildBackground();

            // Cursor
            Mouse.SetCursor(MouseCursor.FromTexture2D(Assets.TextureAimCursor, 18, 18));
        }
Ejemplo n.º 22
0
        public StartMenu(Point screenDim, GraphicsDevice graphicsDevice, Texture2D background, Texture2D hitButtonStart, Texture2D trackButtonStart, Texture2D mouseMenuPointer, Texture2D knobText, Texture2D slideText, SpriteFont font, float volume, Song menuSong, SoundEffect onButton, SoundEffect clickButton, Texture2D help, Texture2D help_info, Texture2D title, Texture2D board, Texture2D exit)
        {
            this.background = background;
            this.screenDim  = screenDim;
            this.menuSong   = menuSong;
            this.help_info  = help_info;
            this.board      = board;
            help_info_on    = false;
            this.title      = title;
            rand            = new Random();
            help_info_Rect  = new Rectangle(-150, 320, help_info.Width, help_info.Height);
            titleRect       = new Rectangle(0, 0, title.Width, title.Height);
            viewDest        = new Rectangle(0, 0, screenDim.X, screenDim.Y);
            viewPos         = new Vector2(rand.Next(background.Width - screenDim.X / 2 + 1), rand.Next(background.Height - screenDim.Y / 2 + 1));
            viewSource      = new Rectangle((int)viewPos.X, (int)viewPos.Y, screenDim.X, screenDim.Y);
            direction       = new Vector2(0, 0);
            RandDirection();
            speed       = 100;
            steadyTime  = 7;       //if changed, change also in the reset part in move background
            color       = Color.White;
            opacity     = 0;       //by the use of a double variable we do not lost any little decrement
            transpCoeff = 255 / 3; //variation of .A per second, defined as range/(timeToLive-steadyTime)
            blackBack   = new Texture2D(graphicsDevice, 1, 1);
            blackBack.SetData(new[] { Color.White });
            phase     = 0;
            boardRect = new Rectangle(screenDim.X - board.Width, (screenDim.Y - board.Height) / 2, board.Width, board.Height);

            newMouse       = new MouseState(0, 0, 0, ButtonState.Released, ButtonState.Released, ButtonState.Released, ButtonState.Released, ButtonState.Released);
            hittingRect    = new Rectangle(boardRect.X + 143, boardRect.Y + 174, hitButtonStart.Width, hitButtonStart.Height);
            trackerRect    = new Rectangle(boardRect.X + 143, boardRect.Y + 372, trackButtonStart.Width, trackButtonStart.Height);
            helpButtonRect = new Rectangle(50, screenDim.Y - 3 * help.Height / 4 - 20, 3 * help.Width / 4, 3 * help.Height / 4);
            hitButton      = new Button(hittingRect, hitButtonStart, Color.White, onButton, clickButton);
            trackButton    = new Button(trackerRect, trackButtonStart, Color.White, onButton, clickButton);
            helpButton     = new Button(helpButtonRect, help, Color.White, onButton, clickButton);
            exitButton     = new Button(new Rectangle(screenDim.X - exit.Width / 4, 0, exit.Width / 4, exit.Height / 4), exit, Color.White, onButton, clickButton);
            Mouse.SetCursor(MouseCursor.FromTexture2D(mouseMenuPointer, mouseMenuPointer.Width / 2, mouseMenuPointer.Height / 2));
            MediaPlayer.Play(menuSong);
            MediaPlayer.IsRepeating = true;

            volumeSlide = new Slider(new Point(screenDim.X - 320 - slideText.Width / 2, boardRect.Y + 592), volume, slideText, knobText, font, "Volume: ", Color.Black);
        }
Ejemplo n.º 23
0
        protected override void Initialize()
        {
            base.Initialize();
            ConfigurationOptionsChanged(Configuration.Options);

            Mouse.SetCursor(MouseCursor.FromTexture2D(Content.Load <Texture2D>("images/cursor"), 0, 0));
            IsMouseVisible = true;

            Storage.Initialize(Content, GraphicsDevice);

            InputListeners.Input = new InputListeners(this);
            Components.Add(InputListeners.Input);

            UiSystem                = new UiSystem(this, style);
            UiSystem.OnRootAdded   += root => root.OnElementRemoved += element => element.Dispose();
            UiSystem.OnRootAdded   += root => Log.Debug("Root '{Name}' added in UiSystem (class {FullName})", root.Name, root.Element.GetType().FullName);
            UiSystem.OnRootRemoved += root => Log.Debug("Root '{Name}' removed in UiSystem (class {FullName})", root.Name, root.Element.GetType().FullName);

            ElementSlot = new SwitchComponent(UiSystem);
            Components.Add(ElementSlot);
            ScreenManager.LoadScreen(new MainMenuScreen(this), new FadeTransition(GraphicsDevice, Color.Black, 0.5f));
        }
Ejemplo n.º 24
0
 public static void Init(GraphicsDeviceManager graphicsDeviceManager)
 {
     GDManager      = graphicsDeviceManager;
     _cursorPointer = MouseCursor.FromTexture2D(GameContent.Texture.Pointer, 1, 1);
     _cursorWand    = MouseCursor.FromTexture2D(GameContent.Texture.Wand, 1, 1);
 }
Ejemplo n.º 25
0
 private void SetupMouseCursor()
 {
     InputSg.MouseSpriteSheet = ContentLoader.GetSpriteSheet(ZeldaGraphics.MainMouseCursor);
     Mouse.SetCursor(MouseCursor.FromTexture2D(InputSg.MouseSpriteSheet._texture, 0, 0));
 }
Ejemplo n.º 26
0
        public static MouseCursor LoadMonoCursor(GraphicsDevice gd, Stream stream)
        {
            var cur = LoadCursor(gd, stream);

            return(MouseCursor.FromTexture2D(cur.Item1, cur.Item2.X, cur.Item2.Y));
        }
Ejemplo n.º 27
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            #region Adding base texture to Sprite

            Texture2D baseTex = new Texture2D(GraphicsDevice, 2, 2);
            Color[]   c       = new Color[4];
            c[0] = Color.White;
            c[1] = Color.White;
            c[2] = Color.White;
            c[3] = Color.White;
            baseTex.SetData(c);
            Texture2DPlus baseTexPlus = new Texture2DPlus(baseTex);
            Sprite.addBaseTexture(baseTexPlus);
            #endregion

            #region Loading fonts

            DrawHelper.DEBUGFONT   = Content.Load <SpriteFont>("fonts/debugfont");
            DrawHelper.SCOREFONT   = Content.Load <SpriteFont>("fonts/ScoreFont");
            DrawHelper.BIGFONT     = Content.Load <SpriteFont>("fonts/BigScoreFont");
            DrawHelper.UPGRADEFONT = Content.Load <SpriteFont>("fonts/currencyFont");
            #endregion

            #region Loading textures

            Texture2DPlus backgroundTex = new Texture2DPlus(Content.Load <Texture2D>("background/Background"));
            Texture2DPlus bluePlanetTex = new Texture2DPlus(Content.Load <Texture2D>("background/BluePlanet"));
            Texture2DPlus smallRedTex   = new Texture2DPlus(Content.Load <Texture2D>("background/LittleRedPlanet"));
            Texture2DPlus bigRedTex     = new Texture2DPlus(Content.Load <Texture2D>("background/RedBigPlanet"));
            Texture2DPlus cursorTex     = new Texture2DPlus(Content.Load <Texture2D>("textures/cursor"));

            Texture2DPlus errorTex             = new Texture2DPlus(Content.Load <Texture2D>("textures/noTexture"));
            Texture2DPlus enemyTex1            = new Texture2DPlus(Content.Load <Texture2D>("textures/enemyShip"), 2);
            Texture2DPlus enemyTex2            = new Texture2DPlus(Content.Load <Texture2D>("textures/enemyShoot"), 2);
            Texture2DPlus enemyTex3            = new Texture2DPlus(Content.Load <Texture2D>("textures/enemySpeed"), 2);
            Texture2DPlus enemyTex4            = new Texture2DPlus(Content.Load <Texture2D>("textures/asteroid"));
            Texture2DPlus shipTex              = new Texture2DPlus(Content.Load <Texture2D>("parts/Hull_3"));
            Texture2DPlus wallTex              = new Texture2DPlus(Content.Load <Texture2D>("textures/wall"));
            Texture2DPlus shotTex              = new Texture2DPlus(Content.Load <Texture2D>("textures/lazor"), 4);
            Texture2DPlus sprayBulletTex       = new Texture2DPlus(Content.Load <Texture2D>("textures/SprayBullet"), 2);
            Texture2DPlus mineBulletTex        = new Texture2DPlus(Content.Load <Texture2D>("textures/mineBullet_1"), 9);
            Texture2DPlus chargingBulletTex    = new Texture2DPlus(Content.Load <Texture2D>("textures/ChargingBullet"), 6);
            Texture2DPlus gravityBulletTex     = new Texture2DPlus(Content.Load <Texture2D>("textures/GravityBullet"), 6);
            Texture2DPlus homingTex            = new Texture2DPlus(Content.Load <Texture2D>("textures/homing"));
            Texture2DPlus healthDropTex        = new Texture2DPlus(Content.Load <Texture2D>("textures/healthPack"), 4);
            Texture2DPlus moneyDropTex         = new Texture2DPlus(Content.Load <Texture2D>("textures/MoneyDrop"), 7);
            Texture2DPlus healthDrop_TIER2_Tex = new Texture2DPlus(Content.Load <Texture2D>("textures/healthDrop_TIER2"), 4);
            Texture2DPlus wrenchTex            = new Texture2DPlus(Content.Load <Texture2D>("textures/wrench"));
            Texture2DPlus explosionDropTex     = new Texture2DPlus(Content.Load <Texture2D>("textures/explosionDrop"), 8);
            Texture2DPlus boltTex              = new Texture2DPlus(Content.Load <Texture2D>("textures/bolt"));
            Texture2DPlus moneyTex             = new Texture2DPlus(Content.Load <Texture2D>("textures/money"));
            Texture2DPlus energyDropTex        = new Texture2DPlus(Content.Load <Texture2D>("textures/energyDrop"), 8);
            Texture2DPlus unitBarBorderTex     = new Texture2DPlus(Content.Load <Texture2D>("textures/unitBarBorder"));
            Texture2DPlus gunTex1              = new Texture2DPlus(Content.Load <Texture2D>("parts/Gun_1"));
            Texture2DPlus mineGunTex           = new Texture2DPlus(Content.Load <Texture2D>("parts/MineGun"));
            Texture2DPlus sprayGunTex          = new Texture2DPlus(Content.Load <Texture2D>("parts/SprayGun"));
            Texture2DPlus chargingGunTex       = new Texture2DPlus(Content.Load <Texture2D>("parts/ChargingGun"));
            Texture2DPlus gravityGunTex        = new Texture2DPlus(Content.Load <Texture2D>("parts/GravityGun"));
            Texture2DPlus engineTex1           = new Texture2DPlus(Content.Load <Texture2D>("parts/Engine_1"));
            Texture2DPlus selectionBoxTex      = new Texture2DPlus(Content.Load <Texture2D>("parts/SelectionBox"));
            Texture2DPlus upgradeBkg           = new Texture2DPlus(Content.Load <Texture2D>("parts/UpgradeBarBkg"));
            Texture2DPlus popupTextBkgTex      = new Texture2DPlus(Content.Load <Texture2D>("textures/PopupTextBkg"));
            Texture2DPlus menuScreenBkg        = new Texture2DPlus(Content.Load <Texture2D>("parts/MenuScreenBkg"));
            Texture2DPlus rotateItemTex        = new Texture2DPlus(Content.Load <Texture2D>("textures/Rotate"));
            Texture2DPlus hammerItemTex        = new Texture2DPlus(Content.Load <Texture2D>("textures/Hammer"));
            Texture2DPlus alertTex             = new Texture2DPlus(Content.Load <Texture2D>("textures/AlertParticle"));
            Texture2DPlus logoTex              = new Texture2DPlus(Content.Load <Texture2D>("textures/logo"));

            //allUpgradeParts.Insert(PartTypes.DETECTORPART, shotTex);
            #endregion

            #region Loading sounds and adding them to list
            SoundHandler.Sounds[(int)IDs.DEFAULT]             = Content.Load <SoundEffect>("sounds/shotSnd");
            SoundHandler.Sounds[(int)IDs.GUNPART]             = Content.Load <SoundEffect>("sounds/shotSnd");
            SoundHandler.Sounds[(int)IDs.GRAVITYBULLET]       = Content.Load <SoundEffect>("sounds/blackholeSnd");
            SoundHandler.Sounds[(int)IDs.MENUCLICK]           = Content.Load <SoundEffect>("sounds/menuclickSnd");
            SoundHandler.Sounds[(int)IDs.CHARGINGGUNPART]     = Content.Load <SoundEffect>("sounds/chargeshotSnd");
            SoundHandler.Sounds[(int)IDs.EXPLOSIONDEATHSOUND] = Content.Load <SoundEffect>("sounds/ExplosionDeath");
            SoundHandler.Sounds[(int)IDs.PLAYERDEATHSOUND]    = Content.Load <SoundEffect>("sounds/player_death");
            SoundHandler.Sounds[(int)IDs.SLOWMOSOUND]         = Content.Load <SoundEffect>("sounds/slomo");
            SoundHandler.Sounds[(int)IDs.REVERSESLOWMOSOUND]  = Content.Load <SoundEffect>("sounds/reverse_slomo");
            SoundHandler.Sounds[(int)IDs.PICKUPSOUND]         = Content.Load <SoundEffect>("sounds/pickup");
            SoundHandler.Songs[(int)IDs.SONG1INTRO]           = Content.Load <SoundEffect>("sounds/OdysseanIntro");
            SoundHandler.Songs[(int)IDs.SONG1]    = Content.Load <SoundEffect>("sounds/Odyssean");
            SoundHandler.Songs[(int)IDs.SONG2]    = Content.Load <SoundEffect>("sounds/Galaxian");
            SoundHandler.Songs[(int)IDs.VICTORY]  = Content.Load <SoundEffect>("sounds/Victorian");
            SoundHandler.Songs[(int)IDs.GAMEOVER] = Content.Load <SoundEffect>("sounds/GameOver");
            //Console.WriteLine(SoundHandler.Songs[(int)IDs.SONG1INTRO].Duration);
            #endregion
            //Directory.GetFiles(Directory.GetCurrentDirectory() + "\\Content\\textures");

            #region Adding sprites to list
            SpriteHandler.Sprites[(int)IDs.DEFAULT] = new Sprite(errorTex);
            //SpriteHandler.Sprites[(int)IDs.DEFAULT_ENEMY] = new Sprite(enemyTex1, 2, 4);
            //SpriteHandler.Sprites[(int)IDs.ENEMYSHOOT] = new Sprite(enemyTex2, 2, 4);
            //SpriteHandler.Sprites[(int)IDs.ENEMYSPEED] = new Sprite(enemyTex3, 2, 4);
            SpriteHandler.Sprites[(int)IDs.ENEMYASTER]       = new Sprite(enemyTex4);
            SpriteHandler.Sprites[(int)IDs.DEFAULT_BULLET]   = new Sprite(shotTex, 4);
            SpriteHandler.Sprites[(int)IDs.CHARGINGBULLET]   = new Sprite(chargingBulletTex, 24);
            SpriteHandler.Sprites[(int)IDs.GRAVITYBULLET]    = new Sprite(gravityBulletTex, 24);
            SpriteHandler.Sprites[(int)IDs.SPRAYBULLET]      = new Sprite(sprayBulletTex, 2);
            SpriteHandler.Sprites[(int)IDs.HOMINGBULLET]     = new Sprite(homingTex);
            SpriteHandler.Sprites[(int)IDs.HEALTHDROP]       = new Sprite(healthDropTex, 6);
            SpriteHandler.Sprites[(int)IDs.HEALTHDROP_TIER2] = new Sprite(healthDrop_TIER2_Tex, 6);
            SpriteHandler.Sprites[(int)IDs.EXPLOSIONDROP]    = new Sprite(explosionDropTex, 6);
            SpriteHandler.Sprites[(int)IDs.ENERGYDROP]       = new Sprite(energyDropTex, 6);
            SpriteHandler.Sprites[(int)IDs.MINEBULLET]       = new Sprite(mineBulletTex, 6);
            SpriteHandler.Sprites[(int)IDs.RECTHULLPART]     = new Sprite(shipTex);
            SpriteHandler.Sprites[(int)IDs.GUNPART]          = new Sprite(gunTex1);
            SpriteHandler.Sprites[(int)IDs.MINEGUNPART]      = new Sprite(mineGunTex);
            SpriteHandler.Sprites[(int)IDs.GRAVITYGUNPART]   = new Sprite(gravityGunTex);
            SpriteHandler.Sprites[(int)IDs.CHARGINGGUNPART]  = new Sprite(chargingGunTex);
            SpriteHandler.Sprites[(int)IDs.SPRAYGUNPART]     = new Sprite(sprayGunTex);
            SpriteHandler.Sprites[(int)IDs.ENGINEPART]       = new Sprite(engineTex1);
            SpriteHandler.Sprites[(int)IDs.DEFAULT_PARTICLE] = new Sprite();
            SpriteHandler.Sprites[(int)IDs.WALL]             = new Sprite(wallTex);
            SpriteHandler.Sprites[(int)IDs.WRENCH]           = new Sprite(wrenchTex);
            SpriteHandler.Sprites[(int)IDs.BOLT]             = new Sprite(boltTex);
            SpriteHandler.Sprites[(int)IDs.EMPTYPART]        = new Sprite(selectionBoxTex);
            SpriteHandler.Sprites[(int)IDs.UPGRADEBAR]       = new Sprite(upgradeBkg);
            SpriteHandler.Sprites[(int)IDs.POPUPTEXTBKG]     = new Sprite(popupTextBkgTex);
            SpriteHandler.Sprites[(int)IDs.MENUSCREENBKG]    = new Sprite(menuScreenBkg);
            SpriteHandler.Sprites[(int)IDs.MONEYDROP]        = new Sprite(moneyDropTex, 6);
            SpriteHandler.Sprites[(int)IDs.MONEY]            = new Sprite(moneyTex);
            SpriteHandler.Sprites[(int)IDs.ROTATEPART]       = new Sprite(rotateItemTex);
            SpriteHandler.Sprites[(int)IDs.HAMMERPART]       = new Sprite(hammerItemTex);
            SpriteHandler.Sprites[(int)IDs.ALERTPARTICLE]    = new Sprite(alertTex);
            SpriteHandler.Sprites[(int)IDs.LOGO]             = new Sprite(logoTex);
            #endregion

            #region Adding partIDs to list
            List <IDs> ids = new List <IDs>();
            for (int i = (int)IDs.DEFAULT_PART + 1; i <= (int)IDs.EMPTYPART; i++)
            {
                ids.Add((IDs)i);
            }
            ids.Add(IDs.ROTATEPART); //!!
            #endregion

            #region Initializing game objects etc.
            background = new Background(new Sprite(backgroundTex), bluePlanetTex, bluePlanetTex, bigRedTex, smallRedTex);
            //Camera.Player = player; //Reintroduce if camera is to be used
            AchievementController achController = new AchievementController();
            SaveHandler.InitializeGame(achController);
            GameMode    gameMode    = new GameMode();
            Projectiles projectiles = new Projectiles();
            GunPart.projectiles = projectiles;

            Player player = new Player(new Vector2(graphics.PreferredBackBufferWidth / 2, graphics.PreferredBackBufferHeight / 2), projectiles); //ok, projectiles null before?
            eventOperator = new EventOperator(this, shipTex, gameMode, achController, player, ids);
            RectangularHull rectHull1 = new RectangularHull();
            RectangularHull rectHull2 = new RectangularHull();
            GunPart         gunPart1  = new ChargingGunPart();
            GunPart         gunPart2  = new ChargingGunPart();
            GunPart         gunPart3  = new GunPart(IDs.DEFAULT);
            EnginePart      engine1   = new EnginePart();
            EnginePart      engine2   = new EnginePart();
            EnginePart      engine3   = new EnginePart();
            Drops           drops     = new Drops(WindowSize.Width, WindowSize.Height);
            gameController = new GameController(player, projectiles, drops, gameMode);
            //wall = new Wall(new Vector2(-4000, -4000)); //! wall location
            UnitBar healthBar = new UnitBar(new Vector2(50, 50), new Sprite(unitBarBorderTex), Color.OrangeRed, 5); //! LOL
            UnitBar energyBar = new UnitBar(new Vector2(50, 85), new Sprite(unitBarBorderTex), Color.Gold, player.maxEnergy);
            playerUI = new PlayerUI(healthBar, energyBar, achController);
            Mouse.SetCursor(MouseCursor.FromTexture2D(cursorTex.Texture, cursorTex.Texture.Width / 2, cursorTex.Texture.Height / 2));
            #endregion

            // TODO: use this.Content to load your game content here
        }
Ejemplo n.º 28
0
 public MonoGameCustomCursor(Pixmap upPixmap, Pixmap downPixmap, int xHotspot, int yHotspot) : base(upPixmap, downPixmap, xHotspot, yHotspot)
 {
     upCursor   = MouseCursor.FromTexture2D(((MonoGameTexture)Mdx.graphics.newTexture(upPixmap)).texture2D, xHotspot, yHotspot);
     downCursor = MouseCursor.FromTexture2D(((MonoGameTexture)Mdx.graphics.newTexture(downPixmap)).texture2D, xHotspot, yHotspot);
     Mouse.SetCursor(upCursor);
 }
Ejemplo n.º 29
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch      = new SpriteBatch(GraphicsDevice);
            resolutionFactor = (float)GraphicsDevice.Viewport.Width / 1920;
            //TODO: use this.Content to load your game content here

            myIntroduction = new Introduction();
            myGameover     = new Gameover();
            myWin          = new Win(GraphicsDevice);
            myEnd          = new End();

            myGameState = new GameState();
            myGameState.init("normal");

            mySystemGenerator = new SystemGenerator();
            myRandom          = new Random();

            myInterfaceManager = new InterfaceManager();

            fontDefault = Content.Load <SpriteFont>("defaultFont");
            fontTitle   = Content.Load <SpriteFont>("titleFont");
            fontMenu    = Content.Load <SpriteFont>("menuFont");
            fontIntro   = Content.Load <SpriteFont>("introFont");

            defaultEffect = new BasicEffect(GraphicsDevice);

            // -- LOAD ALL IMAGES
            img_launchPad     = Content.Load <Texture2D>("launchpad");
            img_rocket        = Content.Load <Texture2D>("rocket");
            img_controlpanel  = Content.Load <Texture2D>("controlpanel");
            img_jauge         = Content.Load <Texture2D>("jauge");
            img_ledOn         = Content.Load <Texture2D>("greenlight");
            img_ledOff        = Content.Load <Texture2D>("redlight");
            img_leverOff      = Content.Load <Texture2D>("leverOff");
            img_leverOn       = Content.Load <Texture2D>("leverOn");
            img_switchOff     = Content.Load <Texture2D>("switchOff");
            img_switchOn      = Content.Load <Texture2D>("switchOn");
            img_particleFire  = Content.Load <Texture2D>("particle");
            img_background    = Content.Load <Texture2D>("background");
            img_star          = Content.Load <Texture2D>("star");
            img_jaugeInverted = Content.Load <Texture2D>("jaugeinverted");
            img_fragment1     = Content.Load <Texture2D>("fragment1");
            img_fragment2     = Content.Load <Texture2D>("fragment2");
            img_fragment3     = Content.Load <Texture2D>("fragment3");
            img_fragment4     = Content.Load <Texture2D>("fragment4");
            img_fragment5     = Content.Load <Texture2D>("fragment5");
            img_fragment6     = Content.Load <Texture2D>("fragment6");
            img_fragment7     = Content.Load <Texture2D>("fragment7");
            fragmentArray     = new Texture2D[7];
            fragmentArray[0]  = img_fragment1;
            fragmentArray[1]  = img_fragment2;
            fragmentArray[2]  = img_fragment3;
            fragmentArray[3]  = img_fragment4;
            fragmentArray[4]  = img_fragment5;
            fragmentArray[5]  = img_fragment6;
            fragmentArray[6]  = img_fragment7;
            img_backgroundsky = Content.Load <Texture2D>("backgroundsky");
            img_cursor        = Content.Load <Texture2D>("White");
            MouseCursor.FromTexture2D(img_cursor, 0, 0);
            //-- LOAD ALL SOUNDS
            sound_clic      = Content.Load <SoundEffect>("clic");
            sound_engine    = Content.Load <SoundEffect>("engine");
            sound_refuel    = Content.Load <SoundEffect>("refuel");
            sound_explosion = Content.Load <SoundEffect>("explosion");
            sound_air       = Content.Load <SoundEffect>("air");
            sound_music     = Content.Load <SoundEffect>("music");
            sound_cool      = Content.Load <SoundEffect>("cool");
            sound_key       = Content.Load <SoundEffect>("key");
            sound_alarm     = Content.Load <SoundEffect>("alarm");
            sound_switchOn  = Content.Load <SoundEffect>("sd_switchOn");
            sound_switchOff = Content.Load <SoundEffect>("sd_switchOff");

            sound_refuelInstance         = sound_refuel.CreateInstance();
            sound_airInstance            = sound_air.CreateInstance();
            sound_musicInstance          = sound_music.CreateInstance();
            sound_musicInstance.IsLooped = true;
            sound_coolInstance           = sound_cool.CreateInstance();
            sound_alarmInstance          = sound_alarm.CreateInstance();
            InitMenuInterface();

            panelHeight           = GraphicsDevice.Viewport.Height - img_controlpanel.Height * resolutionFactor;
            myParticleStarManager = new ParticleManager(new Vector2(GraphicsDevice.Viewport.Width / 2, GraphicsDevice.Viewport.Height / 2));

            defaultRocketPosition = new Vector2(GraphicsDevice.Viewport.Width / 2, panelHeight - img_launchPad.Height + 8);
            InitGameplayInterface();
        }
Ejemplo n.º 30
0
        public override void Awake()
        {
            Texture2D sprite = GameManager.Instance.Content.Load <Texture2D>("Ui/Mouse");

            Mouse.SetCursor(MouseCursor.FromTexture2D(sprite, 0, 0));
        }