public ButterflyLevel(Camera Camera, ButterflyPlayer Player, Logger ErrorLogger, Game1 MyGame) { myCam = Camera; player = Player; butterflies = new List<Butterfly>(); LevelStarting = true; errorLogger = ErrorLogger; myGame = MyGame; spriteQueue = new List<Tuple<Vector3, int>>(); queueTimers = new List<int>(); scoreStrings = new List<string>(); playerProfile = myGame.Services.GetService(typeof(PlayerProfile)) as PlayerProfile; }
public ButterflyActivity(Game1 MyGame) { myGame = MyGame; content = new ContentManager(myGame.Services, "Content"); myCamera = new Camera(); float aspectRatio = (float)myGame.GraphicsDevice.PresentationParameters.BackBufferWidth / (float)myGame.GraphicsDevice.PresentationParameters.BackBufferHeight; myCamera.Perspective(90, myGame.GraphicsDevice.Viewport.AspectRatio, 0.1f, 20f); myCamera.Position = new Vector3(0f, 1f, -10f); myCamera.LookAt(new Vector3(0, 0, 0)); player = new ButterflyPlayer(myGame, new Vector3(0f, 2f, 0) * 2, 0f, myCamera); errorLogger = myGame.Services.GetService(typeof(Logger)) as Logger; counter = -1; }