>>387
すいません、スクリプト自体はコピペで書いてある文字は全然わからないです・・・。
下のスクリプトで動かしているのですが、どう書けば良いのでしょうか・・・
void Update () {
if(animator)
{
float h = Input.GetAxisRaw("Horizontal");
float v = Input.GetAxisRaw("Vertical");
walking = true;
if (h > 0) {
directionX = 1;
directionY = 0;
} else if (h < 0){
directionX = -1;
directionY = 0;
} else if (v > 0) {
directionX = 0;
directionY = 1;
} else if (v < 0){
directionX = 0;
directionY = -1;
} else {
walking = false;
}
if (walking) {
transform.Translate(new Vector3(directionX, directionY, 0) * Time.deltaTime * 0.5f);
}
animator.SetFloat("DirectionX", directionX);
animator.SetFloat("DirectionY", directionY);
animator.SetBool("Walking", walking);