sprite_get_bbox_mode


描述

This function will return the current "mode" for the bounding box calculations. You supply the sprite index of the sprite to check, and the function will return one of the constants shown below.


语法:

sprite_get_bbox_mode(ind);

参数 描述
ind 将会被检查的精灵的索引。


返回

常量

常量 描述
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);
    }

The above checks the bbox mode for the current sprite and if it's not automatic, then it is sets it to that value.