private void CreateEnemySprite() { enemyVisible = true; enemySprite = new SpriteWorker(rng.Next(8, 13), rng.Next(40, (GAMEAREA_WIDTH - 100)), (-100), rng.Next(20, 80), rng.Next(5, 22)); enemySprites.Add(enemySprite); enemyHitRect = enemySprite.GetRectangle(); }
private void CreateMissileSprite() { missileVisible = true; missileAllowed = false; missileSprite = new SpriteWorker(1, (playerSprite.xPos + 7), (GAMEAREA_HEIGHT - 90), 10, 30); missileHitRect = missileSprite.GetRectangle(); audio.PlayMissileSFX(); }
private void CreateCometSprite() { cometVisible = true; cometSprite = new SpriteWorker(rng.Next(2, 7), rng.Next(10, (GAMEAREA_WIDTH - 10)), (-10), rng.Next(1, 5), rng.Next(8, 30)); cometSprites.Add(cometSprite); }
// GENERATE SPRITES AND HIT BOXES // private void CreatePlayerSprite() { playerSprite = new SpriteWorker(0, 0, (GAMEAREA_HEIGHT - 90), 25, 20); playerHitRect = playerSprite.GetRectangle(); }