mirror of
https://github.com/TheRavenwoodArts/LunaLightXMG.git
synced 2026-07-31 00:05:02 -07:00
Quik update
This commit is contained in:
@@ -77,7 +77,7 @@ namespace LunaLightXMG
|
||||
PlayBackgroundMusic(sinkBeats);
|
||||
|
||||
// Generate random platforms - test this idea out...
|
||||
platforms = PlatformGenerator.CreatePlatforms(14);
|
||||
platforms = PlatformGenerator.CreatePlatforms(6);
|
||||
}
|
||||
|
||||
|
||||
@@ -93,13 +93,7 @@ namespace LunaLightXMG
|
||||
player.LoadContent(Content); // player sprite is now handled in player.cs
|
||||
|
||||
// Spawn 10 enemies at the start of the level
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
Vector2 spawnPosition = new Vector2(16 + i*3,-16);
|
||||
Enemy enemy = new Enemy(spawnPosition, GetRandomValueBetween1And3());
|
||||
enemy.LoadContent(Content);
|
||||
enemies.Add(enemy);
|
||||
}
|
||||
enemies = SpawnEnemies(10);
|
||||
|
||||
// Test Render Target
|
||||
renderTarget = new RenderTarget2D(GraphicsDevice, retroWidth, retroHeight);
|
||||
@@ -168,7 +162,19 @@ namespace LunaLightXMG
|
||||
}
|
||||
|
||||
// Method Implementation -------------------------------------------------------------------------------
|
||||
private void PlayBackgroundMusic(SoundEffect backgroundMusic)
|
||||
private List<Enemy> SpawnEnemies(int numberOfEnemies) {
|
||||
List<Enemy> enemies = new List<Enemy>();
|
||||
for (int i = 0; i < numberOfEnemies; i++)
|
||||
{
|
||||
Vector2 spawnPosition = new Vector2(16 + i * 3, -16);
|
||||
Enemy enemy = new Enemy(spawnPosition, GetRandomValueBetween1And3());
|
||||
enemy.LoadContent(Content);
|
||||
enemies.Add(enemy);
|
||||
}
|
||||
return enemies;
|
||||
}
|
||||
|
||||
private void PlayBackgroundMusic(SoundEffect backgroundMusic)
|
||||
{
|
||||
if (backgroundMusicInstance == null || backgroundMusicInstance.State != SoundState.Playing)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user