Beispiel #1
0
 public override bool Collide(Hitbox hitbox)
 {
     return Intersects(hitbox);
 }
Beispiel #2
0
 public abstract bool Collide(Hitbox hitbox);
Beispiel #3
0
 public bool Intersects(Hitbox hitbox)
 {
     return AbsoluteLeft < hitbox.AbsoluteRight && AbsoluteRight > hitbox.AbsoluteLeft && AbsoluteBottom > hitbox.AbsoluteTop && AbsoluteTop < hitbox.AbsoluteBottom;
 }
Beispiel #4
0
 public override bool Collide(Hitbox hitbox)
 {
     return hitbox.Collide(this);
 }
Beispiel #5
0
        public override bool Collide(Hitbox hitbox)
        {
            foreach (var c in colliders)
                if (c.Collide(hitbox))
                    return true;

            return false;
        }
Beispiel #6
0
 public Block()
     : base()
 {
     sprite = new FSprite("Game/green-16");
     Collider = new Hitbox(16, 16);
 }
Beispiel #7
0
 public override bool Collide(Hitbox hitbox)
 {
     return Collide(hitbox.Bounds);
 }