Exemple #1
0
        public static void Main(string[] args)
        {
            Hero hero = new Hero("Bron", "Dragonslayer", 100, 100, 2);
            Spell spell = new Spell("Fireball", 20, 60, 2);
            Weapon wep = new Weapon("Stinger", 5);
            hero.Equip(wep);
            hero.Learn(spell);
            Dungeon dung = new Dungeon();
            string map = @"C:\Users\Budinov\Documents\Visual Studio 2015\Projects\Week05Day03\ConsoleApplication2\level1.txt";
            dung.GenerateMap(map);
            dung.Spawn(hero);

            dung.PrintMap();
            dung.MoveHero(Dungeon.Direction.Left);
            dung.PrintMap();
            dung.MoveHero(Dungeon.Direction.Left);
            dung.PrintMap();
        }
Exemple #2
0
 public void Equip(Weapon weapon)
 {
     this.weapon = weapon;
     this.heroWeaponDamage = weapon.weaponDamage;
 }
Exemple #3
0
 public int Attack(Weapon weapon)
 {
     return weapon.weaponDamage;
 }