Exemplo n.º 1
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.º 2
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.º 3
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);
        }
Exemplo n.º 4
0
        public Player(float x, float y, Session session)
            : base(x, y)
        {
            // Assign session
            this.session = session;

            // Init bounce sounds
            bounce[0] = new Sound("assets/sfx/bounce1.wav");
            bounce[1] = new Sound("assets/sfx/bounce2.wav");
            bounce[2] = new Sound("assets/sfx/bounce3.wav");
            for (int i = 0; i < 3; ++i) {
                bounce[i].Volume = 0.98f;
            }

            // Set up animations
            sprite.Add(AnimType.Go, new Anim(new int[] { 0, 1, 2, 3, 4, }, new float[] { 5.0f }));
            sprite.Add(AnimType.Attack, new Anim(new int[] { 7, 8, 9, 10, 11, 12, 13 }, new float[] { 4.0f }));
            sprite.Play(AnimType.Go);

            // Set up hitboxes
            SetHitbox(sprite.Width - 24, sprite.Height - 24, (int)Tags.PLAYER);
            Hitbox.CenterOrigin();

            // Sprite stuff
            sprite.CenterOrigin();
            Graphic = sprite;

            Layer = -1;

            // Initilize light
            light = new Light();
            light.SetAlpha(0.7f);
            light.SetColor(new Color("879DFF"), new Color("62D8E0"));
            light.SetColorSpan(5.0f);
            light.SetRadius(sprite.Width + 30, sprite.Width + 60);
            light.SetRadiusSpan(5.0f);
            light.entity = this;
            Level.lights.Add(light);

            // TODO: Make ink slow you down
        }
Exemplo n.º 5
0
        public Player(float x, float y, Session session) : base(x, y)
        {
            // Assign session
            this.session = session;

            // Init bounce sounds
            bounce[0] = new Sound("assets/sfx/bounce1.wav");
            bounce[1] = new Sound("assets/sfx/bounce2.wav");
            bounce[2] = new Sound("assets/sfx/bounce3.wav");
            for (int i = 0; i < 3; ++i)
            {
                bounce[i].Volume = 0.98f;
            }

            // Set up animations
            sprite.Add(AnimType.Go, new Anim(new int[] { 0, 1, 2, 3, 4, }, new float[] { 5.0f }));
            sprite.Add(AnimType.Attack, new Anim(new int[] { 7, 8, 9, 10, 11, 12, 13 }, new float[] { 4.0f }));
            sprite.Play(AnimType.Go);

            // Set up hitboxes
            SetHitbox(sprite.Width - 24, sprite.Height - 24, (int)Tags.PLAYER);
            Hitbox.CenterOrigin();

            // Sprite stuff
            sprite.CenterOrigin();
            Graphic = sprite;

            Layer = -1;

            // Initilize light
            light = new Light();
            light.SetAlpha(0.7f);
            light.SetColor(new Color("879DFF"), new Color("62D8E0"));
            light.SetColorSpan(5.0f);
            light.SetRadius(sprite.Width + 30, sprite.Width + 60);
            light.SetRadiusSpan(5.0f);
            light.entity = this;
            Level.lights.Add(light);

            // TODO: Make ink slow you down
        }