/// <summary> /// Constructs a new Enemy. /// </summary> public Enemy(BaseGame game, Vector2 position, string spriteSet) { this.game = game; this.position = position; LoadContent(spriteSet); }
public BuildPopupScreen(BaseGame game) : base("Build Screen Test") { this.game = game; ContentManager content = game.Content; // Flag that there is no need for the game to transition // off when the build popup is on top of it. IsPopup = true; //VARIOUS TEST CONTENT / CONTROLS ClickableObject buttonOne = new ClickableObject(game, new Vector2(100, 100), "Sprites/Player/"); ClickableObject buttonTwo = new ClickableObject(game, new Vector2(250, 100), "Sprites/MonsterA/"); objects.Add(buttonOne); objects.Add(buttonTwo); PictureBox pictureBox = new PictureBox(new Vector2(250, 250), content.Load<Texture2D>("TestPictureBox")); controls.AddControl("pictureBox", pictureBox); //TODO add Font utils helper to easily access fonts and add more fonts to library SpriteFont font = content.Load<SpriteFont>("Fonts/gamefont"); Label testLabel = new Label("This is a test label..", new Vector2(250, 400), font); controls.AddControl("testLabel", testLabel); Button testButton = new Button(content.Load<Texture2D>("Buttons/TestButton"), null, new Vector2(50, 250), "Button text goes here..."); testButton.Clicked += MonkeyEvents.TestButtonClickEvent; controls.AddControl("testButton", testButton); }
/// <summary> /// Constructors a new player. /// </summary> public Player(BaseGame game, Vector2 position) { this.game = game; LoadContent(); Reset(position); }
/// <summary> /// Constructors a new player. /// </summary> public ClickableObject(BaseGame game, Vector2 position, String spriteSet) { this.game = game; LoadContent(spriteSet); Reset(position); }