TextureとOTAnimationはそれぞれドラッグ&ドロップで配置すること
//変数宣言
int AnimationNo = 4;
public Texture PlayerTex4;
public Texture PlayerTex5;
public Texture PlayerTex7;
public OTAnimation PlayerAni4;
public OTAnimation PlayerAni5;
public OTAnimation PlayerAni7;
Texture PlayerTex;
OTAnimation PlayerAni;
//アニメーション選別
if (AnimationNo == 4) {
PlayerTex = PlayerTex4;
PlayerAni = PlayerAni4;
} else if (AnimationNo == 5) {
PlayerTex = PlayerTex5;
PlayerAni = PlayerAni5;
} else if (AnimationNo == 7) {
PlayerTex = PlayerTex7;
PlayerAni = PlayerAni7;
}
//アニメーション入れ替え
OT.AnimatingSprite("Player").spriteContainer.texture = PlayerTex;
OT.AnimatingSprite("Player").animation = PlayerAni;