private void NoteSpawnTrigger(GameTime gameTime, Playfield playfield)
        {
            _noteSpawnTime += gameTime.ElapsedGameTime.TotalSeconds;

            if (_noteSpawnTime > _noteTimeGap)
            {
                _noteSpawnTime    = 0;
                _noteSpawnPoint.X = UsefulFunctions.GetTextureCenterPoint(Texture.Bounds, Location, Texture, UsefulFunctions.CenterPointType.X);
                _noteSpawnPoint.Y = Location.Y + 20;
                playfield.AddNote(_noteSpawnPoint, ID, true);
            }
        }
Beispiel #2
0
 void NoteSpawnTrigger(GameTime gameTime, Playfield playfield)
 {
     _noteSpawnPoint.X = Location.X + 35;
     if (_noteSpawnTime > 0.10)
     {
         _noteSpawnTime      = 0;
         _noteFireSoundTime += gameTime.ElapsedGameTime.TotalSeconds;
         if (_noteFireSoundTime > 0.01)
         {
             _noteFireSound.Play();
             _noteFireSoundTime = 0;
         }
         playfield.AddNote(_noteSpawnPoint, ID, false);
     }
 }