Beispiel #1
0
        //instantiates main hero character and puts it on the board
        void InitMainHero()
        {
            Hero = new MainHero("", 200, 12, 5, 1, this);   //default hero settings

            Board.Children.Add(Hero.CharacterAvatar.Image); //adds an avatar to the board
            Hero.CharacterAvatar.DrawAvatar(this);          //draws an avatar on the board
        }
 public EnterNameBox(MainHero hero, MainWindow window)
 {
     InitializeComponent();
     Show();
     this.Hero   = hero;
     this.Window = window;
     this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
 }
Beispiel #3
0
 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();
 }