Jump to content

  • Log In with Google      Sign In   
  • Create Account


Joker123

Member Since 06 Jul 2012
Offline Last Active Feb 18 2014 04:49 PM

Posts I've Made

In Topic: How can I use Windows Phone sensors to move an object?

25 December 2013 - 04:20 AM

I don't know how to use this formula in my code: On = On-1 + α(In – On-1)

How can I use the formula or a similar formula in my code?


In Topic: How to save an integer variable to an XML file?

21 July 2012 - 03:25 AM

I tried this tutorial: http://wellroundedge...gs-Manager.aspx
But I have some difficulties. The file "settings.xml" isn't getting saved. I tried it on Windows 7 but I couldn't find the filePosted Image Why isn't this working?
protected override void Initialize()
	    {
		    SettingsManager.LoadSettings();
		    base.Initialize();
	    }
protected override void Update(GameTime gameTime)
{
  KeyboardState kbState = Keyboard.GetState();
  if (kbState.IsKeyDown(Keys.A))
  SettingsManager.Settings.HasRunOnce = false;
  if (SettingsManager.Settings.HasRunOnce == false)
  SettingsManager.SaveSettings();
  base.Update(gameTime);
}

In Topic: ArgumentNullException was unhandled. What is wrong?

07 July 2012 - 10:55 AM

Problem solved. I added this in the LoadContent() of Game1:
foreach(Sprite sprite in sprites) {
    sprite.Load(Content);
}

In Topic: ArgumentNullException was unhandled. What is wrong?

06 July 2012 - 04:51 PM

I get the error message in this line :
batch.Draw(
		    texture,
		    position,
		    null,
		    Color.White,
		    rotation,
		    Vector2.Zero,
		    scale,
		    SpriteEffects.None,
		    0f);
I changed the line
texture = content.Load<Texture2D>(textureAsset);
to
texture = content.Load<Texture2D>("light");
but it changed nothing. Always the same error message.
+  Color.White {R:255 G:255 B:255 A:255} Microsoft.Xna.Framework.Color
+  Vector2.Zero {X:0 Y:0} Microsoft.Xna.Framework.Vector2
+  batch {Microsoft.Xna.Framework.Graphics.SpriteBatch} Microsoft.Xna.Framework.Graphics.SpriteBatch
+  position {X:100 Y:100} Microsoft.Xna.Framework.Vector2
  rotation 0.0 float
+  scale {X:0,1 Y:0,1} Microsoft.Xna.Framework.Vector2
  texture null Microsoft.Xna.Framework.Graphics.Texture2D
+  this {SharedContent.Sprite} SharedContent.Sprite

In Topic: ArgumentNullException was unhandled. What is wrong?

06 July 2012 - 01:30 PM

TextureAsset is set to "light", but texture is always null.
Here is the file.
http://depositfiles.com/files/kj4an4ef7

PARTNERS