Exemplo n.º 1
0
 private void iterateThroughCreatedProjectiles(IRangeWeapon rangeWeapon, ref IPooledProjectile currentProjectile)
 {
     for (int i = 0; i < projectilesBoundToCharacterType[rangeWeapon.Character.CharacterType].Count; i++)
     {
         if (!projectilesBoundToCharacterType[rangeWeapon.Character.CharacterType][i].Active)
         {
             projectilesBoundToCharacterType[rangeWeapon.Character.CharacterType][i].Active = true;
             currentProjectile = projectilesBoundToCharacterType[rangeWeapon.Character.CharacterType][i];
             break;
         }
     }
 }
Exemplo n.º 2
0
 private void addNewProjectileToList(IRangeWeapon rangeWeapon, ref IPooledProjectile currentProjectile)
 {
     if (projectilesBoundToCharacterType[rangeWeapon.Character.CharacterType][projectilesBoundToCharacterType[rangeWeapon.Character.CharacterType].Count - 1].Active)
     {
         lastElement = projectilesBoundToCharacterType[rangeWeapon.Character.CharacterType].Count - 1;
         addProjectile(rangeWeapon);
         projectilesBoundToCharacterType[rangeWeapon.Character.CharacterType][lastElement].Active = true;
         currentProjectile = projectilesBoundToCharacterType[rangeWeapon.Character.CharacterType][lastElement];
     }
 }