sprite_flush_multi


描述

With this function you can remove the any number of texture pages for the given sprites from texture memory. You supply the sprite indices as an array and the texture pages they are assigned to will be removed from texture memory. Note that if one of the texture pages is used elsewhere in the room (by another instance sprite or a background, etc...) you may get a minor performance hit as the page is immediately reloaded back into memory again, so care should be taken when using this function. Note that the function will return -1 if flush is not supported for the chosen resources or the target platform is HTML5, or it will return 0 if all worked correctly.


语法:

sprite_flush_multi(array);

参数 描述
array Array with the sprite indices to flush


返回:

Int (-1 or 0)


例如:

spr_a[0] = spr_Player_Aura1;
spr_a[1] = spr_Player_Aura2;
spr_a[2] = spr_Player_Aura3;
spr_a[3] = spr_Player_Aura4;
sprite_flush_multi(spr_a);

上述函数将会创建一个数组,数组中每个元素都存储一个精灵索引。此数组将会被用来从存储中清除那些精灵纹理。