public MainHero(string name, int maxHealth, int att, int def, int level, MainWindow mainWindow) : base(name, maxHealth, att, def, level, mainWindow) { CharacterAvatar = new Avatar( //sets default avatar parameters 22, 20, DirectoryProvider.GetRelativeDirectory(@"C:\Users\LEN\source\repos\Gra\Gra\Graphics\HeroAvatar.jpg"), mainWindow); }
void ChooseEnemyImage() // chooses enemy's image by its class { if (Enemy.GetType().ToString() == "Gra.Knight") { SetEnemyImage(DirectoryProvider.GetRelativeDirectory(@"C:\Users\LEN\source\repos\Gra\Gra\Graphics\Knight.jpg")); } else if (Enemy.GetType().ToString() == "Gra.Dwarf") { SetEnemyImage(DirectoryProvider.GetRelativeDirectory(@"C:\Users\LEN\source\repos\Gra\Gra\Graphics\Dwarf.jpg")); } }
public Water(List <ILandscapeObject> list, MainWindow mainWindow) { Random rand = new Random(); Element = new Avatar( rand.Next(1, (int)mainWindow.Width / 15), rand.Next(1, (int)mainWindow.Height / 15), DirectoryProvider.GetRelativeDirectory(ImagePath), mainWindow); list.Add(this); }
public FightScreen(MainHero hero, Character enemy, MainWindow mainWindow) { InitializeComponent(); WindowStartupLocation = WindowStartupLocation.CenterScreen; // lokates window in center of the screen this.Hero = hero; this.Enemy = enemy; MainWindow = mainWindow; FightHandler = new Fight(this); //sets hero's image HeroImage(DirectoryProvider.GetRelativeDirectory(@"C:\Users\LEN\source\repos\Gra\Gra\Graphics\Conan.jpg")); //sets enemy's image based on enemy's class ChooseEnemyImage(); SetStats(); SetButtons(); }