此函数将返回边界框计算的当前“模式”。您提供要检查的精灵的精灵索引,该函数将返回如下所示的常量之一。
sprite_get_bbox_mode(ind);
参数 | 类型 | 描述 |
---|---|---|
ind | Sprite Asset | 要检查的精灵的索引。 |
常量 | 描述 |
---|---|
bboxmode_automatic | Automatic - The bounding box will be calculated automatically, based on the tolerance setting for the sprite |
bboxmode_fullimage | Full Image - The bounding box will be set to use the full width and height of the sprite, regardless of the tolerance and "empty" pixels |
bboxmode_manual | Manual - The bounding box has been set manually to user defined values (either in the sprite editor, or using the function sprite_set_bbox()) |
if (sprite_get_bbox_mode(sprite_index) != 0)
{
sprite_set_bbox_mode(sprite_index, bboxmode_automatic);
}
上面检查了当前精灵的bbox模式,如果它不是自动,则将其设置为该值。