Пример #1
0
 public Enemy(Point position, Bitmap sprite, Rectangle bbox, Bitmap spriteGlow)
 {
     Position   = position;
     Sprite     = sprite;
     Bbox       = bbox;
     Health     = 4;
     SpriteGlow = BlurEffect.Blur(new Bitmap(spriteGlow, sprite.Width + 30, sprite.Height + 30), 10);
     InitCollisions();
 }
Пример #2
0
 public Player(Point position, Bitmap sprite, Rectangle bbox, Bitmap spriteGlow)
 {
     Position = position;
     Sprite   = sprite;
     Bbox     = bbox;
     Health   = 100;
     //1 - степень размытия
     SpriteGlow = new Bitmap(BlurEffect.Blur(spriteGlow, 1), sprite.Width + 30, sprite.Height + 30);
     Collision += (other) => SpeedVector = new Point(SpeedVector.X / 2, SpeedVector.Y / 2);
 }