skeleton_skin_set


语法:

skeleton_skin_set(skinname);

参数 描述
skinname The name (a string) of the skin to use.


Returns:

N/A(无返回值)


描述

A skeletal animation sprite can be drawn with a variety of textures (called "skins"), permitting you to use one single animation for multiple different purposes. For example, you may have a generic walk animation and this can be used by your NPC characters, enemies, etc... in a game simply by changing the skin it is drawn with. These skins need to have been previously created and named in your animation program, and this name is passed into the function (as a string) to set the sprite to use that skin when being drawn.

重要!该函数在试用版(Trial License)产品中可用。


例如:

if skeleton_skin_get() == "skin_Enemy1"
   {
   skeleton_skin_set(choose("skin_Enemy1", "skin_Enemy2", "skin_Enemy3");
   }

The above code would check the currently assigned skin for the animation and if it is "skin_Enemy1", it chooses and sets a new skin from one of three options.