public void AddEffect(WeaponEffect weaponEffect) { //Alex Holm N9918205 Weapon_effects.Add(weaponEffect); //Record Current Game on Weapon Effect. Passing THIS into reference weaponEffect.RecordCurrentGame(this); }
/// <summary> /// Removes the WeaponEffect referenced by weaponEffect from the array or list used by Gameplay to store /// active WeaponEffects. /// /// Author John Santias October 2017 /// </summary> /// <param name="weaponEffect">The weapon's effect to be used by the tank</param> public void EndEffect(WeaponEffect weaponEffect) { if (WeaponsEffect.Contains(weaponEffect)) { WeaponsEffect.Remove(weaponEffect); } }
public void CancelEffect(WeaponEffect weaponEffect) { Weapon_effects.Remove(weaponEffect); }
/// <summary> /// Adds given weaponEffect to the list/array of WeaponEffects. Adds the weaponEffect to the /// first blank spot in the list/array. /// /// Author John Santias October 2017 /// </summary> /// <param name="weaponEffect">The weapon's effect to be used by the tank</param> public void AddWeaponEffect(WeaponEffect weaponEffect) { WeaponsEffect.Add(weaponEffect); weaponEffect.RecordCurrentGame(this); }
public void EndEffect(WeaponEffect weaponEffect) { // Removing the referenced WeaponEffect weaponEffects.Remove(weaponEffect); }
public void AddEffect(WeaponEffect weaponEffect) { // Adding weapon effects weaponEffects.Add(weaponEffect); weaponEffect.RecordCurrentGame(this); }
/// <summary> /// This method adds the given WeaponEffect to its list/array of WeaponEffects. /// </summary> /// <param name="weaponEffect">The WeaponEffect to be added to this game</param> public void AddWeaponEffect(WeaponEffect weaponEffect) { weaponEffects.Add(weaponEffect); weaponEffects[weaponEffects.IndexOf(weaponEffect)].SetCurrentGame(this); }