public Camera1Animation1(Demo demo, int instanceIndex) { this.demo = demo; instanceIndexName = " " + instanceIndex.ToString(); sphereName = "Sphere"; cursorName = "Cursor"; cursorAName = "Cursor A"; cursorBName = "Cursor B"; shotName = "Camera 1 Shot" + instanceIndexName + " "; shotBaseName = "Camera 1 Shot Object" + instanceIndexName + " "; shotLightName = "Camera 1 Shot Light" + instanceIndexName + " "; yellowName = "Yellow"; hitName = "Hit"; defaultName = "Default"; shotTab = new PhysicsObject[10]; random = new Random(); listener = new DemoListener(); emitter = new DemoEmitter(); vectorZero = Vector3.Zero; matrixIdentity = Matrix4.Identity; quaternionIdentity = Quaternion.Identity; }
public void Start(DemoListener listener, DemoEmitter emitter) { AL.Listener(ALListener3f.Position, ref listener.Position); AL.Listener(ALListenerfv.Orientation, ref listener.FrontDirection, ref listener.TopDirection); AL.Source(sourceHandle, ALSource3f.Position, ref emitter.Position); AL.Source(sourceHandle, ALSource3f.Direction, ref emitter.FrontDirection); if (AL.GetSourceState(sourceHandle) != ALSourceState.Playing) { AL.SourcePlay(sourceHandle); } }
public DemoSound GetSound(PhysicsSound soundData, DemoListener listener, DemoEmitter emitter) { int index; DemoSound sound; if (currentSounds.Count > 0) { index = currentSounds.Count - 1; sound = currentSounds[index]; currentSounds.RemoveAt(index); } else { sound = new DemoSound(demo.SoundQueue, this); totalSounds.Add(sound); } sound.SoundData = soundData; sound.Listener = listener; sound.Emitter = emitter; return(sound); }