public void Test_AddClip() { var ply = new SoundPlayer (); var clip1 = new SoundClip ("PinPon.wav"); var clip2 = new SoundClip ("nice_music.ogg"); ply.AddClip (clip1); ply.AddClip (clip2); Assert.AreEqual (2, ply.ClipCount); Assert.AreEqual (2, ply.Clips.Count ()); Assert.AreEqual (clip1, ply["PinPon.wav"]); Assert.AreEqual (clip2, ply["nice_music.ogg"]); }
public static Node Create() { var clip = new SoundClip ("BattleScene"); clip.AddTrack(new MusicTrack("media/BGM-BattleScene.ogg")); clip.Play (); clip.Volume = 0.5f; var ply = new SoundPlayer (); ply.AddClip (clip); var node = new Node ("BGM"); node.Attach (ply); return node; }