Beispiel #1
0
        /// <summary>
        /// Create new MonsterSpecial object from assigned properties
        /// </summary>
        private void CreateMonsterSpecial()
        {
            MonsterSpecial monsterSpecialObj;

            monsterSpecialObj = new MonsterSpecial(Name, Text);

            NewMonsterSpecial = monsterSpecialObj;

            OnMonsterSpecialCreated(EventArgs.Empty);
        }
Beispiel #2
0
 /// <summary>
 /// When the User clicks on a different MonsterSpecial or Attack in the UI Info list
 /// If its a MonsterSpecial
 /// Add MonsterSpecial info message to the info label
 /// If its an Attack
 /// Add the Attack's Special to the label
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void lstInfo_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (lstInfo.SelectedItem is MonsterSpecial)
     {
         MonsterSpecial monsterSpecial = (MonsterSpecial)lstInfo.SelectedItem;
         lblInfo.Text = monsterSpecial.GetInfoMessage();
     }
     else
     {
         Attack attack = (Attack)lstInfo.SelectedItem;
         lblInfo.Text = attack.Special;
     }
 }