PlanBaseIsSpriteTouching Method |
Determines if the specified sprite is touching this plan's rectangle.
Namespace: (Default Namespace)Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax public virtual bool IsSpriteTouching(
SpriteBase sprite
)
Parameters
- sprite
- Type: (Default Namespace)SpriteBase
Sprite to test
Return Value
Type:
BooleanTrue if the sprite's solidity rectangle is touching this plan's rectangle,
otherwise false.
Remarks "Touching" means one rectangle is overlapping the other, or the borders
are immediately adjacent. The rectangles are not considered touching if the corners
are only diagonally adjacent (kitty-corner). There must be some length of adjecent
edge. This ensures that a plan that is blocked off by two diagonally-arranged
solid blocks can't be touched (and thus potentially "activated") through the crack.
See Also