示例#1
0
        public formMain()
        {
            InitializeComponent();

            //Merge Image Layers
            PlayerJouster.Parent   = EnemyJouster;
            PlayerJouster.Location = new Point(0, 0);

            //Initilize Jousters (Opposing Picturebox, Characters Picturebox, Health Icon 1, Health Icon 2, Health Icon 3, Side(player: 0, Opposing: 1))
            PlJouster = new Jousters(this.EnemyJouster, this.PlayerJouster, this.PlayerHealth1, this.PlayerHealth2, this.PlayerHealth3, 0);
            EnJouster = new Jousters(this.PlayerJouster, this.EnemyJouster, this.EnemyHealth1, this.EnemyHealth2, this.EnemyHealth3, 1);

            //Get Original positions for resetting
            ExitOrigin = buttonExit.Location;

            //Pass the Opposing Jouster
            PlJouster.setRival(EnJouster);
            EnJouster.setRival(PlJouster);

            //Menu background music
            BackgroundMusic = new MediaPlayback();
            BackgroundMusic.PlayAudio(@"C:\Users\rossh\Desktop\Dino-Jousting-master\Sound\Gurdys Green - Patty Gurdy (Hurdy Gurdy Music).wav");

            //Prevents activating the replay button on accident by holding spacebar when the game ends
            buttonExit.DisableSelect();
        }
示例#2
0
 //Grab Rival
 public void setRival(Jousters rival)
 {
     Rival = rival;
 }