public override void Update(GameTime gameTime) { for (int i = 0; i < notes.Count; i++) { VisualNote note = notes[i]; note.Update(ExhibeatSettings.TimeElapsed /*gameTime.ElapsedGameTime.Milliseconds*/); if (note.time_left < 0) { notes.Remove(note); ExhibeatSettings.GetAudioManager().stop(clapSongIdx); ExhibeatSettings.GetAudioManager().play(clapSongIdx); Press(); i--; } #if ANIMATED_TILE else { note.sprite_sheet.Update(gameTime); } #endif } if (pressAnimation) { if (glowTargetOpacity > 0f) // apparition { if (glowOpacity >= 0.7f) { glowTargetOpacity = 0f; } else { glowOpacity += 0.05f; } } else // disparition { if (glowOpacity > 0f) { glowOpacity -= 0.01f; } else { glowOpacity = 0f; pressAnimation = false; } } } }
/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { // Allows the game to exit if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) { this.Exit(); } // TODO: Add your update logic here #if DEBUG fpsDisplay.Update(gameTime); #endif ExhibeatSettings.GetAudioManager().update(); base.Update(gameTime); }
public HexTile(ContentManager contentmanager, float X = 0, float Y = 0) : base() { position = new Vector2(X, Y); content = contentmanager; texture_base = content.Load <Texture2D>("hexagon_base"); texture_press = content.Load <Texture2D>("hexagon_press"); #if ANIMATED_TILE texture_move = content.Load <Texture2D>(ExhibeatSettings.GrowthAnimationName); spritesheet = content.Load <SpriteSheet>(ExhibeatSettings.GrowthAnimationName + "_sheet"); #else texture_move = content.Load <Texture2D>("hexagon_empty"); #endif note_origin = new Vector2(texture_base.Width / 2, texture_base.Height / 2); press_origin = new Vector2(texture_press.Width / 2, texture_press.Height / 2); notes = new List <VisualNote>(); clapSongIdx = ExhibeatSettings.GetAudioManager().open(ExhibeatSettings.ResourceFolder + "taiko-normal-hitclap.wav"); blurEffect = null; }
public void Initialize(ContentManager Content) { _parser = new EXParser(); _audioManager = ExhibeatSettings.GetAudioManager(); }