SpriteCollision()

语法

Result = SpriteCollision(#Sprite1, x1, y1, #Sprite2, x2, y2)
概要
Tests if the two sprites are overlapping.

参数

#Sprite1 The first sprite to test.
x1, y1 Coordinates of the first sprite, in pixels.
#Sprite2 The second sprite to test.
x2, y2 Coordinates of the second sprite, in pixels.

返回值

Nonzero if the two sprites are overlapping, zero otherwise.

Remarks

This routine compares the rectangular areas around the sprites, giving a very fast but not very accurate function (depending on the shapes of your sprites). Very useful for fast arcade games. Zoomed sprites are also supported.

For a more exact collision check use SpritePixelCollision().

参阅

SpritePixelCollision()

已支持操作系统

所有

<- SpriteBlendingMode() - Sprite Index - SpriteDepth() ->