Questions tagged as 'xna'

1
answer

Capture pressed buttons on video game control reliably

I want to use an XBox control to control a program. It's not a game, it's just a Windows Forms application. I do not want to use XNA because I do not want to force the redistributables to download when I use my application on another machine....
asked by 23.03.2014 / 20:45
2
answers

How to use Window.ClientBouds inside a class in XNA

I'm having trouble limiting the character's movement to the edge of the screen. In class Game1 which is my main I can use Window.ClientBounds , but when I use this function inside class Player1 it gives the error:    'The...
asked by 20.05.2014 / 16:37
1
answer

New position X and Y depending on direction and distance?

I'm doing a mini shooting game in XNA but I can not figure out how to calculate the following: Knowingthepositionofthecenteroftheimage,thedirectioninwhichitispointingandthedistancebetweenthecenterandthe"nozzle" of the weapon, how to know the...
asked by 21.09.2016 / 12:27
2
answers

Get project content in MonoDevelop

I'm trying to insert a PNG image in my game, but I'm not getting it, the image is in Content/alien.png , with the code below: Texture2D alien; . . . protected override void LoadContent () { spriteBatch = new SpriteBatch (GraphicsDevi...
asked by 11.11.2016 / 04:42
1
answer

Detect collision of a rotated rectangle?

I am using the following code to know if a point is inside a rectangle: public bool Intersect(ÍcaroDantasCollisions.Rectangle rectangle) { if(x >= rectangle.x && x <= rectangle.x + rectangle.width) { if(y >= re...
asked by 22.09.2016 / 23:55