public Level() { // Set up background AddGraphic(background); background.Scroll = 0; AddGraphic(corners); background.Shader = shader; lightTexture1.CenterOrigin(); lightTextures.Add(lightTexture1); lights.Clear(); darkness.Clear(); player = null; }
public override void Begin() { base.Begin(); // Add the player player = Add(new Player(1920 >> 1, 1080 >> 1, Global.PlayerOne)); Add(new EnemySpawner(player)); var explosion = Add(new Explosion(1920 >> 1, 1080 >> 1)); explosion.SetAlpha(2.0f, 1.0f, 0.0f); explosion.SetRadius(2.0f, 100.0f, 580.0f, 560.0f, 480.0f); // Create the four corners CreateCorners(); // Add dat surface Game.AddSurface(ambientLighting); Game.AddSurface(lightSurface); Game.AddSurface(darknessSurface); }