public void IsFighted(BrokeThePigWeapon Weapon) { if (ValueChanged != null) { ValueChanged(); } if (Weapon != null) Number -= Weapon.Damage; if (Number <= 0) { Number = 0; if (BecomeNull != null) { BecomeNull(); } } OnPropertyChanged("Number"); }
void Weapon_Selected(BrokeThePigWeapon SelectedWeapon) { if(CurrentWeapon!=null) CurrentWeapon.UnSelect(); SelectedWeapon.Select(); CurrentWeapon = SelectedWeapon; }
public void AddWeapon(BrokeThePigWeapon Weapon) { Weapons.Add(Weapon); Weapon.SelectedEvent += Weapon_Selected; Weapon.FightEvent += Weapon_FightEvent; }