Пример #1
1
 protected Item(Image image, Image imageEffect, Sound soundEffect, Point initialPosition)
     : base(image, Rectangle.FromCenter(initialPosition, Size.Zero))
 {
     this.imageEffect = imageEffect;
     this.soundEffect = soundEffect;
     RenderLayer = MaxRenderLayer;
 }
Пример #2
0
 public ZoomingEffect(Image image, Rectangle startDrawArea, Rectangle endDrawArea,
     float timeout = 1.0f)
     : base(image, startDrawArea)
 {
     this.startDrawArea = startDrawArea;
     this.endDrawArea = endDrawArea;
     this.timeout = timeout;
 }
Пример #3
0
 public Game(Content content, Renderer renderer, Time time, Score score, RabbitsGrid rabbits)
 {
     gameOverImage = content.Load<Image>("GameOver");
     this.time = time;
     this.score = score;
     this.renderer = renderer;
     this.rabbits = rabbits;
     rabbits.InitializeRabbits();
 }
Пример #4
0
 public AnimatedSprite(Image image, Rectangle initialDrawArea, Color color, int width, 
     int height, int spritesPerSecond, Point[] frames)
     : base(image, initialDrawArea, color)
 {
     sizeSprite.Width = width;
     sizeSprite.Height = height;
     spriteTime = (1.0f / spritesPerSecond);
     this.frames = frames;
 }
Пример #5
0
 public Rabbit(Image image, Point position)
     : base(image, Rectangle.One)
 {
     originalSize = image.PixelSize / Score.QuadraticFullscreenSize;
     DrawArea = Rectangle.FromCenter(position, originalSize);
     velocity = new Point(Random.Get(-0.035f, 0.035f), Random.Get(-0.025f, 0.025f));
     boundingBox = Rectangle.FromCenter(position, originalSize * 1.2f);
     IsVisible = false;
 }
Пример #6
0
 public RabbitsGrid(Content content, Renderer renderer, Time time, Score score)
     : base(GetColumns(renderer.Screen.Viewport), GetRows(renderer.Screen.Viewport))
 {
     rabbitImage = content.Load<Image>("Rabbit");
     deadRabbitImage = content.Load<Image>("DeadRabbit");
     malletHitSound = content.Load<Sound>("MalletHit");
     malletBloodImage = content.Load<Image>("BloodSplatter");
     this.renderer = renderer;
     this.score = score;
     this.time = time;
 }
Пример #7
0
 public FadeoutEffect(Image image, Rectangle drawArea, float timeout = 1.0f)
     : base(image, drawArea)
 {
     this.timeout = timeout;
 }
Пример #8
0
 public FadeoutEffect(Image image, Point position, Size size, float timeout = 1.0f)
     : base(image, Rectangle.FromCenter(position, size))
 {
     this.timeout = timeout;
 }
Пример #9
0
 public TestContentResolver(TestResolver testResolver, Image demoImage)
     : base(testResolver)
 {
     SetupVectorText();
     SetupXmlContent();
 }
Пример #10
0
 public Sprite(Image image, Rectangle initialDrawArea)
     : this(image, initialDrawArea, Color.White)
 {
 }
Пример #11
0
 public Sprite(Image image, Rectangle initialDrawArea, Color color)
 {
     Image = image;
     DrawArea = initialDrawArea;
     Color = color;
 }
Пример #12
0
 public Brick(Image image, Point offset)
     : base(image, Rectangle.Zero)
 {
     Offset = offset;
     RenderLayer = (int)Blocks.RenderLayer.Grid;
 }
Пример #13
0
 public DeadRabbit(Image image, Rectangle drawArea)
     : base(image, drawArea, 5.0f)
 {
 }