sprite_flush


描述

With this function you can remove the given texture page for the given sprite from texture memory. You supply the sprite index (as defined when creating the sprite resource) and ithe texture page it is assigned to will be removed from texture memory. Note that if the texture page 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, so care should be taken when using this function. Note that the function will return -1 if flush is not supported for the chosen resource or the target platform is HTML5, or it will return 0 if all worked correctly.


语法:

sprite_flush(ind)

参数 描述
ind The index (resource name) of the sprite asset to flush


返回:

Int (-1 or 0)


例如:

sprite_flush(spr_Player_Aura);

上述函数将会从存储中清除 "spr_Player_Aura" 。