public static Laser addLaser(Laser laser) { availableLasers.Enqueue(laser); return laser; }
public static Laser spawnLaser(long seed, Vector3 position, Quaternion rotation, SceneObject parent) { Laser rLaser = null; if (availableLasers.Count == 0) { rLaser = new Laser(seed, position, rotation); rLaser.respawn(seed, position, rotation, parent); } else { rLaser = availableLasers.Dequeue(); rLaser.respawn(seed, position, rotation, parent); } return ((Laser)Space394Game.GameInstance.CurrentScene.addSceneObject(rLaser)); }