|
RectHitSprite | |
CollisionFlag = RectHitSprite(RectX1, RectY1, RectX2, RectY2, SpriteIndex) | |
Parameters: RectX1 = The top left X coordinate of rectangle RectY1 = The top left Y coordinate of rectangle RectX2 = The bottom right X coordinate of rectangle RectY2 = The bottom right Y coordinate of rectangle SpriteIndex = The Sprite to check for collision against |
|
Returns: CollisionFlag = The result of the collision query (0= No collision ,1 = Collision) |
|
The RectHitSprite function returns if a collision occurs between a rectangle and a sprite. When testing the sprite the RectHitSprite command uses the sprites current collision mode as the hard region of the sprite. FACTS: * RectHitSprite uses the sprites collision mode as the hard region of the sprite. * See SpriteCollisionMode for available collision modes. Mini Tutorial: This example creates a random image, creates 10 randomly positioned sprites on the screen using this image. The main loop rotates the sprites while scans them for collisions using RectHitSprite
|
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |