mirror of
https://github.com/TheRavenwoodArts/LunaLightXMG.git
synced 2026-07-30 22:55:03 -07:00
Quik update
This commit is contained in:
@@ -77,7 +77,7 @@ namespace LunaLightXMG
|
|||||||
PlayBackgroundMusic(sinkBeats);
|
PlayBackgroundMusic(sinkBeats);
|
||||||
|
|
||||||
// Generate random platforms - test this idea out...
|
// 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
|
player.LoadContent(Content); // player sprite is now handled in player.cs
|
||||||
|
|
||||||
// Spawn 10 enemies at the start of the level
|
// Spawn 10 enemies at the start of the level
|
||||||
for (int i = 0; i < 10; i++)
|
enemies = SpawnEnemies(10);
|
||||||
{
|
|
||||||
Vector2 spawnPosition = new Vector2(16 + i*3,-16);
|
|
||||||
Enemy enemy = new Enemy(spawnPosition, GetRandomValueBetween1And3());
|
|
||||||
enemy.LoadContent(Content);
|
|
||||||
enemies.Add(enemy);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Test Render Target
|
// Test Render Target
|
||||||
renderTarget = new RenderTarget2D(GraphicsDevice, retroWidth, retroHeight);
|
renderTarget = new RenderTarget2D(GraphicsDevice, retroWidth, retroHeight);
|
||||||
@@ -168,7 +162,19 @@ namespace LunaLightXMG
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Method Implementation -------------------------------------------------------------------------------
|
// 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)
|
if (backgroundMusicInstance == null || backgroundMusicInstance.State != SoundState.Playing)
|
||||||
{
|
{
|
||||||
|
|||||||
+7
-1
@@ -126,8 +126,14 @@ namespace LunaLightXMG
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
platforms.Add(new Platform(new Vector2(x, y + 4), 16, 16));
|
platforms.Add(new Platform(new Vector2(x, y + 4), 16, 16));
|
||||||
|
if (x + 16 < 288)
|
||||||
|
{
|
||||||
|
for (int j = 1; j < 3; j++)
|
||||||
|
{
|
||||||
|
platforms.Add(new Platform(new Vector2(x + (j*16), y + 4), 16, 16));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return platforms;
|
return platforms;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user