public Enemy(ActionScreen parent) { Health = MaxHealth = 50; Mana = MaxMana = 3; TextureName = "skelly"; SpellList = new Spellbook(); }
protected override void LoadContent() { _gamePlaySong = Content.Load <Song>("Sounds\\battle"); _menuSong = Content.Load <Song>("Sounds\\menu_song2"); _dead = Content.Load <Song>("Sounds\\defeat"); MediaPlayer.IsRepeating = true; MediaPlayer.Play(_menuSong); _menuClickSelected = Content.Load <SoundEffect>("Sounds\\button-25"); _spriteBatch = new SpriteBatch(GraphicsDevice); _gameIsOn = false; SetScreenSize(); _gameOverScreen = new GameOverScreen(this, _spriteBatch, Content.Load <SpriteFont>("menufont"), Content.Load <Texture2D>("gameover_screen")); Components.Add(_gameOverScreen); _gameOverScreen.Hide(); _startScreen = new StartScreen(this, _spriteBatch, Content.Load <SpriteFont>("menufont"), Content.Load <Texture2D>("splash_screen")); Components.Add(_startScreen); _startScreen.Hide(); _actionScreen = new ActionScreen(this, _spriteBatch, Content.Load <Texture2D>("Levels\\level1_background")); Components.Add(_actionScreen); _actionScreen.Hide(); //_activeScreen = _gameOverScreen; //_gameOverScreen.SetScoreText(); _activeScreen = _startScreen; _activeScreen.Show(); }
public Room(ActionScreen parent) { int room = Game1.Random.Next(1, 6); TextureName = "room" + room; string[] monsters = { "Demon", "Ghost", "Skull" }; Enemy = (Entity)Activator.CreateInstance(Type.GetType("Spring.enemies." + monsters[Game1.Random.Next(0, monsters.Length)])); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); startScreen = new StartScreen(this, spriteBatch); Components.Add(startScreen); actionScreen = new ActionScreen(this, spriteBatch); Components.Add(actionScreen); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. _spriteBatch = new SpriteBatch(GraphicsDevice); // Menu _startScreen = new StartScreen(this, _spriteBatch, Content.Load <SpriteFont>("Fonts/gameFont"), Content.Load <Texture2D>("Background/startScreen")); Components.Add(_startScreen); _startScreen.Hide(); _actionScreen = new ActionScreen(this, _spriteBatch, Content.Load <Texture2D>("Background/spaceBackground")); Components.Add(_actionScreen); _actionScreen.Hide(); _activeScreen = _startScreen; _activeScreen.Show(); // Load _player Animation playerAnimation = new Animation(); Texture2D playerTexture = Content.Load <Texture2D>("Animation/Space Unicorn"); playerAnimation.Initialize(playerTexture, Vector2.Zero, 166, 100, 1, 5, Color.White, 1f, true); Vector2 playerPosition = new Vector2(GraphicsDevice.Viewport.Width / 4, GraphicsDevice.Viewport.Height / 2); _player.Initialize(playerAnimation, playerPosition); // Load enemy _enemyTexture = Content.Load <Texture2D>("Animation/enemy"); // Load background _bgLayer1.Initialize(Content, "Background/spaceBackground", GraphicsDevice.Viewport.Width, -1); // Load _marshmallows _marshmallowIcon = Content.Load <Texture2D>("Animation/marshmallowLaser"); // Load music _gameMusic = Content.Load <Song>("Music/Space Unicorn"); // Load explosion _explosionTexture = Content.Load <Texture2D>("Animation/explosion"); // Load _font _font = Content.Load <SpriteFont>("Fonts/gameFont"); // Load powers _healthBoostIcon = Content.Load <Texture2D>("Powers/healthPowerUp"); _speedIcon = Content.Load <Texture2D>("Powers/speedIncrease"); _hyperSpaceIcon = Content.Load <Texture2D>("Powers/hyperSpace"); _saviorIcon = Content.Load <Texture2D>("Powers/bomb"); _addFairyIcon = Content.Load <Texture2D>("Powers/addFairy"); // Play music PlayMusic(_gameMusic); }
protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); spriteFont = Content.Load <SpriteFont>("font"); formFont = Content.Load <SpriteFont>("FormFont"); popUpTexture = Content.Load <Texture2D>("quitscreen"); actionScreentexture = Content.Load <Texture2D>("greenmetal"); blankBlackTexture = Content.Load <Texture2D>("black"); //initialize and start the screens startScreen = new StartScreen(this, spriteBatch, formFont); Components.Add(startScreen); startScreen.ButtonClicked += new StartScreen.ClickEvent(HandleStartScreenButtons); startScreen.Hide(); networkScreen = new NetworkGameSelectScreen(this, spriteBatch, spriteFont, blankBlackTexture); Components.Add(networkScreen); networkScreen.ButtonClicked += new NetworkGameSelectScreen.ClickEvent(HandleNetworkSelectScreenButtons); networkScreen.Hide(); joinGameScreen = new JoinNetworkGameScreen(this, spriteBatch, formFont, blankBlackTexture); Components.Add(joinGameScreen); joinGameScreen.ButtonClicked += new JoinNetworkGameScreen.ClickEvent(HandleJoinGameScreenButtons); joinGameScreen.Hide(); hostGameScreen = new HostNetworkGameScreen(this, spriteBatch, formFont, blankBlackTexture); Components.Add(hostGameScreen); hostGameScreen.ButtonClicked += new HostNetworkGameScreen.ClickEvent(HandleHostGameScreenButtons); hostGameScreen.Hide(); actionScreen = new ActionScreen(this, spriteBatch, actionScreentexture); Components.Add(actionScreen); actionScreen.Hide(); popUpScreen = new PopUpScreen(this, spriteBatch, spriteFont, popUpTexture); Components.Add(popUpScreen); popUpScreen.Hide(); activeScreen = startScreen; //activeScreen = joinGameScreen; activeScreen.Show(); IsMouseVisible = true; }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); startScreen = new StartScreen(this, spriteBatch); Components.Add(startScreen); actionScreen = new ActionScreen(this, spriteBatch); Components.Add(actionScreen); Texture2D first = Content.Load <Texture2D>("backgrounds/landscape1"); Texture2D second = Content.Load <Texture2D>("backgrounds/landscape"); Utility.HilightFont = Content.Load <SpriteFont>("fonts/hilightFont"); backgroundImage = Content.Load <Texture2D>("backgrounds/main_menu_background"); background = new Background(backgroundImage, new Rectangle(0, 0, 1024, 768)); HideAllScreens(); startScreen.show(); }
public SpellHandler(ActionScreen parent) { _parent = parent; //_spellDrawer = new SpellDrawer(); }
public CombatInterface(Entity enemy, ActionScreen parent) { // get rid of this code ? _enemy = enemy; _parent = parent; }