public Parasite(Vector2 position, Vector2 velocity) { this.velocity = velocity; s = new Sprite(ContentStorageManager.Get<Texture2D>("Parasite")); s.CenterOriginOnTexture(); s.Scale = 0.5f; s.position = position; s.Color = Color.Red; Me = this; }
ScreenText st; //used to display PAUSE while paused #endregion Fields #region Constructors public GameplayState(Game game) : base(game) { Game1 g = (Game1)game; input = ContentStorageManager.Get<InputController>("input"); st = new ScreenText("Courier", "PAUSE", new Vector2(2, 2), new Vector2(300, 300));//initialize the PAUSE text //Create and set pause buttons Dictionary<string, ImageButton.Callback> menuButtons = new Dictionary<string, ImageButton.Callback>(); menuButtons.Add("PauseResume", resumeButton); menuButtons.Add("MainMenuQuit", quitButton); //initialize menu pauseMenu = new Menu(g, menuButtons, HLayout.Center, VLayout.Bottom, new Vector2(300, 300), 10); player = new ControllableShip(new Vector2(Game1.ScreenSize.X / 2, Game1.ScreenSize.Y / 2), new Vector2(10, 10)); parasite = new Parasite(player.Position, new Vector2(8,8)); parasite.controlShip = player; level = new Level(1); // this method (level.Generate()) will be called when the level is needed to change. For now, its here. level.GenerateLevel(level.current_level); }