Exemplo n.º 1
0
        public MainMenu()
            : base(1920, 1080)
        {
            AddGraphic(background);
            background.Scroll = 0;
            AddGraphic(corners);

            credits.X = 250;
            credits.Y = 960;
            credits.CenterOrigin();
            AddGraphic(credits);

            lights.Clear();

            background.Shader = new Shader(ShaderType.Fragment, "assets/shaders/water_wave.frag");

            ambientLighting = new Surface(1920, 1080);
            lightSurface = new Surface(1920, 1080);

            Add(new Logo(421, 542, "assets/gfx/logo.png"));

            // Play/How To/Quit buttons
            playButton = Add(new Logo(1486, 440, "assets/gfx/play.png", 14.0f));
            howToButton = Add(new Logo(1544, 540, "assets/gfx/howto.png", 14.0f));
            quitButton = Add(new Logo(1480, 640, "assets/gfx/quit.png", 14.0f));

            menuLight = new Light(0, 0.1f);
            menuLight.entity = playButton;
            menuLight.SetAlpha(1.0f, 0.7f);
            menuLight.SetAlphaSpan(1.1f);
            menuLight.SetOffset(175, 100);
            lights.Add(menuLight);
        }
Exemplo n.º 2
0
        public MainMenu() : base(1920, 1080)
        {
            AddGraphic(background);
            background.Scroll = 0;
            AddGraphic(corners);

            credits.X = 250;
            credits.Y = 960;
            credits.CenterOrigin();
            AddGraphic(credits);

            lights.Clear();

            background.Shader = new Shader(ShaderType.Fragment, "assets/shaders/water_wave.frag");

            ambientLighting = new Surface(1920, 1080);
            lightSurface    = new Surface(1920, 1080);

            Add(new Logo(421, 542, "assets/gfx/logo.png"));

            // Play/How To/Quit buttons
            playButton  = Add(new Logo(1486, 440, "assets/gfx/play.png", 14.0f));
            howToButton = Add(new Logo(1544, 540, "assets/gfx/howto.png", 14.0f));
            quitButton  = Add(new Logo(1480, 640, "assets/gfx/quit.png", 14.0f));

            menuLight        = new Light(0, 0.1f);
            menuLight.entity = playButton;
            menuLight.SetAlpha(1.0f, 0.7f);
            menuLight.SetAlphaSpan(1.1f);
            menuLight.SetOffset(175, 100);
            lights.Add(menuLight);
        }
Exemplo n.º 3
0
		public LightningArea(float x, float y, Vector2 direction) : base(x, y, direction, 0.1f, 110, 1.7f, 1, (int)Tags.PROJECTILE, (int)Tags.PLAYERATTACK) {
			light = new Light();
			light.SetAlpha(0.5f, 0.7f);
			light.SetAlphaSpan(0.3f);
			light.SetColor(new Color("FFD700"));
			light.SetColorSpan(5.0f);
			light.SetRadius(300, 355);
			light.SetRadiusSpan(0.07f);
			light.entity = this;
			Level.lights.Add(light);
		}
Exemplo n.º 4
0
 public LightningArea(float x, float y, Vector2 direction)
     : base(x, y, direction, 0.1f, 110, 1.7f, 1, (int)Tags.PROJECTILE, (int)Tags.PLAYERATTACK)
 {
     light = new Light();
     light.SetAlpha(0.5f, 0.7f);
     light.SetAlphaSpan(0.3f);
     light.SetColor(new Color("FFD700"));
     light.SetColorSpan(5.0f);
     light.SetRadius(300, 355);
     light.SetRadiusSpan(0.07f);
     light.entity = this;
     Level.lights.Add(light);
 }
Exemplo n.º 5
0
        public LightningBall(float x, float y, Vector2 direction) : base(x, y, direction, 16.0f, 26, 1.2f, 5, (int)Tags.PROJECTILE, (int)Tags.PLAYERATTACK)
        {
            sprite.CenterOrigin();
            Graphic      = sprite;
            sprite.Scale = 0.3f;

            light = new Light();
            light.SetAlpha(0.5f, 0.7f);
            light.SetAlphaSpan(0.5f);
            light.SetColor(new Color("FFD700"));
            light.SetColorSpan(5.0f);
            light.SetRadius(sprite.Width + 70, sprite.Width + 100);
            light.SetRadiusSpan(0.1f);
            light.entity = this;
            Level.lights.Add(light);
        }