|
ShapeHitSprite | |
CollisionFlag = ShapeHitSprite(ShapeIndex, ShapeX#, ShapeY#, SpriteIndex) | |
Parameters: ShapeIndex = The Shape you wish to test ShapeX# = The X coordinate of the shape ShapeY# = The Y coordinate of the shape SpriteIndex = The Sprite to check for collision against |
|
Returns: CollisionFlag = The result of the collision query (0= No collision ,1 = Collision) |
|
The ShapeHitSprite function returns if a collision occurs between a vector shape and a sprite. When testing the sprite the ShapeHitSprite command uses the sprites current collision mode as the hard region of the sprite. FACTS: * ShapeHitSprite uses the sprites collision mode as the hard region of the sprite. * See SpriteCollisionMode for more information about 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 ShapeHitSprite
|
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |