Tag Info

New answers tagged

0

I have managed to get my application working with the first approach I was attempting to use. It appears that the way I am disposing of the GameScene is the cause of the issue. It seems as though it is also disposing of the SceneManager functionality which the GameScene is derived from as I noticed that none of my update and draw calls in both SceneManager ...


0

While not properly portable (it is only for Windows and Linux). MonoGame has an event for text input that uses properly buffered keyboard input. MonoGame.Framework/GameWindow.cs /// Use this event to retrieve text for objects like textbox's. /// This event is not raised by noncharacter keys. /// This event also supports key repeat. /// For ...


1

It seems I have managed to resolve the issue by using the overloaded Texture2D.GetData (int level, Rectangle? rect, T[] data, int startIndex, int elementCount) method. Texture2D texture = level.Tiles[x, y].Texture; Rectangle source = level.Tiles[x, y].Source; Color[] colorData = new Color[source.Width * source.Height]; texture.GetData(0, source, colorData, ...


1

Just build the XNB file on your personal machine, and use that file in your project. Remove the .spritefont file from your content project. Then add the built XNB file to your game project, in an appropriate directory (generally "Content") and set its properties (select it and press F4) to "Copy if newer". This is off the top of my head. So look at the ...


2

Yes, you can add (Drawable)GameComponents at any time. When you add them before Game.Initialize (eg: in your game constructor), they will have their Initialize method called when Game.Initialize is called. If you add them after Initialize is called on your game class, then they will have their Initialize method called when they are added to the ...



Top 50 recent answers are included