2011-07-30, 09:19 AM
Currently it looks like this in Game1.cs:
I swapped it with:
And then just went on to replace every other instance of 'mWizardSprite' with 'Wizard'. It works perfectly fine.
However, when I change the definition back to Wizard mWizardSprite (only the definition, leaving everything else as Wizard), the intialize method says that there's a problem. Apparently 'WindowsGame11.Wizard' is a 'type' but is used like a 'variable'. What does this error mean?
I know how to solve it (I have to change all the corresponding commands (that referred to Wizard) to instead refer to mWizardSprite once again since I changed the definition back) but I don't understand what C# is trying to tell me is happening in its error message. I googled the error message, but still am not sure what it's supposed to mean. The error message occurs in the following line of coding:
Code:
public class Game1 : Microsoft.Xna.Framework.Game
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
Wizard mWizardSprite;I swapped it with:
Code:
public class Game1 : Microsoft.Xna.Framework.Game
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
Wizard Wizard;And then just went on to replace every other instance of 'mWizardSprite' with 'Wizard'. It works perfectly fine.
However, when I change the definition back to Wizard mWizardSprite (only the definition, leaving everything else as Wizard), the intialize method says that there's a problem. Apparently 'WindowsGame11.Wizard' is a 'type' but is used like a 'variable'. What does this error mean?
I know how to solve it (I have to change all the corresponding commands (that referred to Wizard) to instead refer to mWizardSprite once again since I changed the definition back) but I don't understand what C# is trying to tell me is happening in its error message. I googled the error message, but still am not sure what it's supposed to mean. The error message occurs in the following line of coding:
Code:
protected override void Initialize()
{
// TODO: Add your initialization logic here
mWizardSprite = new Wizard();
