Touch() 개인적인 메소드

private Touch ( MegaMan.Engine.CollisionBox targetbox, MegaMan.Engine.CollisionBox mybox ) : void
targetbox MegaMan.Engine.CollisionBox
mybox MegaMan.Engine.CollisionBox
리턴 void
예제 #1
0
        private Rectangle CheckTargetBox(CollisionBox hitbox, Rectangle boundBox, IEntity entity, CollisionComponent coll, CollisionBox targetBox)
        {
            var rect = targetBox.BoxAt(coll.PositionSrc.Position);

            if (boundBox.IntersectsWith(rect))
            {
                coll.Touch(hitbox, targetBox);
                Touch(targetBox, hitbox);
                CollideWith(entity, hitbox, targetBox);
            }
            return(boundBox);
        }
예제 #2
0
 private RectangleF CheckTargetBox(CollisionBox hitbox, RectangleF boundBox, IEntity entity, CollisionComponent coll, CollisionBox targetBox)
 {
     RectangleF rect = targetBox.BoxAt(coll.PositionSrc.Position);
     if (boundBox.IntersectsWith(rect))
     {
         coll.Touch(hitbox, targetBox);
         Touch(targetBox, hitbox);
         CollideWith(entity, hitbox, targetBox);
     }
     return boundBox;
 }