Example #1
0
        public void OnCollected(Enemy collectedBy)
        {

          //  killMonsterSound.Play(screenManager.Settings.SoundVolumeAmount);
            killMonsterSound.Play();

        }
Example #2
0
        /// <summary>
        /// Instantiates an enemy and puts him in the level.
        /// </summary>
        private LevelTile LoadEnemyTile(int x, int y, string spriteSet, int health, int attack, int exp)
        {
            Vector2 position = RectangleExtensions.GetBottomCenter(GetBounds(x, y));
            Enemy e = new Enemy(position, spriteSet, health, attack, exp);
            Level.enemies.Add(e);

            return new LevelTile(null, TileCollision.Passable);
        }