예제 #1
0
        /// <summary>
        /// adds the given attack effect to AttackEffects
        /// </summary>
        /// <param name="weaponEffect"> This weapon effect is added</param>
        public void AddEffect(AttackEffect weaponEffect)
        {
            theAttackEffects.Add(weaponEffect); // adds the element to the list

            // call setcurrentgame on new element
            // finds the last element of list ( the newly added attackeffect and calls function
            theAttackEffects[(theAttackEffects.Count - 1)].SetCurrentGame(this);
        }
예제 #2
0
        public void AddEffect(AttackEffect weaponEffect)
        {
            /// <summary>
            ///
            /// This method adds the given AttackEffect to its list/array of AttackEffects.
            ///
            /// </summary>

            _effect.Add(weaponEffect);
        }
예제 #3
0
        public void RemoveWeaponEffect(AttackEffect weaponEffect)
        {
            /// <summary>
            ///
            /// This method removes the AttackEffect referenced by weaponEffect from the array or list used by
            /// Game to store active AttackEffects.
            ///
            /// </summary>

            _effect.Remove(weaponEffect);
        }
예제 #4
0
파일: Game.cs 프로젝트: tdiego95/TankBattle
 public void EndEffect(AttackEffect weaponEffect)
 {
     lAttackEffect.Remove(weaponEffect);
 }
예제 #5
0
파일: Game.cs 프로젝트: tdiego95/TankBattle
 public void AddWeaponEffect(AttackEffect weaponEffect)
 {
     weaponEffect.RecordCurrentGame(this);
     lAttackEffect.Add(weaponEffect);
 }
예제 #6
0
 /// <summary>
 /// removes referenced weapon effect from attackeffects
 /// </summary>
 /// <param name="weaponEffect">remove this effect</param>
 public void RemoveWeaponEffect(AttackEffect weaponEffect)
 {
     theAttackEffects.Remove(weaponEffect); // removes the element
 }
예제 #7
0
 public void CancelEffect(AttackEffect weaponEffect)
 {
     attackEffectList.Remove(weaponEffect);
 }