public GameMusic() { soundScript = new SoundEvent("GameMusic"); SampleSoundEvent ev1 = new SampleSoundEvent("quest14_medley.ogg"); soundScript.AddEvent(0.4, ev1); soundScript.AddEvent(1 * 630, ev1); soundScript.AddEvent(2 * 630, ev1); soundScript.AddEvent(3 * 630, ev1); soundScript.AddEvent(4 * 630, ev1); }
public GameMusic() { //track = TTengineMaster.ActiveGame.Content.Load<Song>("A01"); soundScript = new SoundEvent("GameMusic"); SampleSoundEvent ev1 = new SampleSoundEvent("quest.ogg"); soundScript.AddEvent(0, ev1); soundScript.AddEvent(300, ev1); soundScript.AddEvent(600, ev1); soundScript.AddEvent(900, ev1); }
public GameMusic() { //track = TTengineMaster.ActiveGame.Content.Load<Song>("A01"); soundScript = new SoundEvent("GameMusic"); SampleSoundEvent ev1 = new SampleSoundEvent("ductia.ogg"); soundScript.AddEvent(2, ev1); soundScript.AddEvent(166, ev1); soundScript.AddEvent(332, ev1); soundScript.AddEvent(498, ev1); soundScript.AddEvent(664, ev1); }
public GameMusic() { soundScript = new SoundEvent("GameMusic"); SampleSoundEvent ev1 = new SampleSoundEvent("layers.ogg"); soundScript.AddEvent(0.5, ev1); }
protected void Play(int effect, float volume) { SoundEvent sev = new SoundEvent(); sev.AddEvent(0f, soundsBank[effect]); sev.Amplitude = volume; soundScript.AddEvent(SimTime + 0.020f, sev); }
/// <summary> /// Play method to play an effect from SoundEffects enum at specified volume /// </summary> /// <param name="effect">index into effect sounds bank (from SoundEffects enum)</param> /// <param name="volume">volume, typically 0-1 but can be higher to boost weak sounds</param> public void PlaySound(int effect, double volume) { SoundEvent sev = new SoundEvent(); sev.AddEvent(0f, soundsBank[effect]); sev.Amplitude = volume; soundScript.AddEvent(SimTime + 0.010f, sev); }
/** * call this to attach this event to a parent SoundEvent in a * rendering tree. Uses a specific internal trick of 'negative time' * to accomodate for the duration of the event. (Climax is at end of event) */ public void AttachTo(SoundEvent ev) { ev.AddEvent(-_duration,this); }