/// <summary>
/// Load graphics content for the game.
/// </summary>
public override void Activate(bool instancePreserved)
{
if (!instancePreserved)
{
if (content == null)
content = new ContentManager(ScreenManager.Game.Services, "Content");
List<Texture2D> textures = new List<Texture2D>();
textures.Add(content.Load<Texture2D>("tex/star"));
part = new ParticleEngine(textures, new Vector2(400, 240));
world = new WorldObject(ScreenManager.Game, ScreenManager.SpriteBatch);
// create worldline queue
for (int i = 0; i < 800; i++)
{
world.addLine(-1);
}
spriteManager = new SpriteManager(ScreenManager.Game, touchPosition, isPressed, world, part);
ScreenManager.Game.Components.Add(spriteManager);
Thread.Sleep(1000);
ScreenManager.Game.ResetElapsedTime();
}
#if WINDOWS_PHONE
if (Microsoft.Phone.Shell.PhoneApplicationService.Current.State.ContainsKey("PlayerPosition"))
{
// playerPosition = (Vector2)Microsoft.Phone.Shell.PhoneApplicationService.Current.State["PlayerPosition"];
// enemyPosition = (Vector2)Microsoft.Phone.Shell.PhoneApplicationService.Current.State["EnemyPosition"];
}
}