WaveOculusDemoProject.Components.ProjectileManager.GetFreeProjectile C# (CSharp) Method

GetFreeProjectile() public method

Get a new free projectile
public GetFreeProjectile ( ) : WaveOculusDemoProject.Components.ProjectileController
return WaveOculusDemoProject.Components.ProjectileController
        public ProjectileController GetFreeProjectile()
        {
            if (this.FreeProjectiles.Count == 0)
            {
                this.InstantiateProjectiles(ProjectileCountIncrement);
            }

            ProjectileController projectile = this.FreeProjectiles[0];
            this.FreeProjectiles.RemoveAt(0);
            this.BusyProjectiles.Add(projectile);

            return projectile;
        }