Ejemplo n.º 1
0
 protected bool botten(bilder sprites)
 {
     return(this.rec.Top + this.hastighet.Y < bilder.Rectangle.Bottom &&
            this.rec.Bottom < texture.Rectangle.Bottom &&
            this.rec.Right < texture.Rectangle.Left &&
            this.rec.Left < texture.Rectangle.Right);
 }
Ejemplo n.º 2
0
 protected bool höger(bilder sprites)
 {
     return(this.rec.Left + this.hastighet.X < bilder.Rectangle.Right &&
            this.rec.Top < bilder.Rectangle.Top &&
            this.rec.Right < bilder.Rectangle.Left &&
            this.rec.Left < bilder.Rectangle.Right);
 }
Ejemplo n.º 3
0
 protected bool toppen(bilder sprites)
 {
     return(this.rec.Bottom + this.hastighet.Y < texture.Rectangle.Top &&
            this.rec.Top < texture.Rectangle.Top &&
            this.rec.Right < texture.Rectangle.Left &&
            this.rec.Left < texture.Rectangle.Right);
 }
Ejemplo n.º 4
0
 protected bool vänster(bilder sprites)
 {
     return(this.rec.Right + this.hastighet.X < bilder.Rectangle.Left &&
            this.rec.Left < bilder.Rectangle.Left &&
            this.rec.Bottom < bilder.Rectangle.Top &&
            this.rec.Top < bilder.Rectangle.Bottom);
 }