/// <summary> /// LoadContent wird einmal pro Spiel aufgerufen und ist der Platz, wo /// Ihr gesamter Content geladen wird. /// </summary> protected override void LoadContent() { // Erstellen Sie einen neuen SpriteBatch, der zum Zeichnen von Texturen verwendet werden kann. spriteBatch = new SpriteBatch(GraphicsDevice); kinectRuntime.NuiCamera.ElevationAngle = 10; //Lade alle Bilder mImages = new Texture2D[SourceEffect.getCount(0)]; for (int i = 0; i < mImages.Length; i++) { mImages[i] = this.Content.Load <Texture2D>(SourceEffect.getImageFromID(i)); } //Lade alle Videos mVideos = new Video[SourceEffect.getCount(1)]; for (int k = 0; k < mVideos.Length; k++) { mVideos[k] = this.Content.Load <Video>(SourceEffect.getVideoFromID(k)); } //Lade alle SoundEffecte mSoundFX = new SoundEffect[SourceEffect.getCount(2)]; for (int k = 0; k < mSoundFX.Length; k++) { mSoundFX[k] = this.Content.Load <SoundEffect>(SourceEffect.getSoundFromId(k)); } if (SourceEffect.getSongFromId(mShow.bgMusic) != null) { mSong = this.Content.Load <Song>(SourceEffect.getSongFromId(mShow.bgMusic)); } myFont = Content.Load <SpriteFont>(@"SpriteFont1"); //Start Video if its first if (mShow.currentScene.mSourceEffect != null && mShow.currentScene.mSourceEffect.id == Utils.VIDEO_ID) { player.Play(mVideos[Convert.ToInt16(mShow.currentScene.mSourceEffect.source)]); } //Start Soundeffect if its first if (mShow.currentScene.mSourceEffect != null && mShow.currentScene.mSourceEffect.id == Utils.SOUND_FX_ID) { mSoundFX[Convert.ToInt16(mShow.currentScene.mSourceEffect.source)].Play(); } //Start BG Song, if it exists if (mSong != null) { MediaPlayer.Play(mSong); } }
public Flash(SourceEffect effect, int duration, int pose) { this.pose_id = pose; this.sourceEffect = effect; this.duration = duration; }
public Scene(SourceEffect effect, int duration, String name) { this.mSourceEffect = effect; this.duration = duration; this.name = name; }