using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerMove : MonoBehaviour
{
    [SerializeField] Animation_Player _anime;
    public float con = 2f;
    public void Move(int vect)
    {
        switch (vect)

        {
            //��~���̈ړ������P�[�X
            case 0:
                _anime.Idle();
                break;


            //���v���̈ړ������P�[�X
            case 1:
                this.transform.Translate(Vector3.forward * con * Time.deltaTime);
                this.transform.rotation = Quaternion.Euler(0f, 0f, 0f);
                _anime.Walk();
                break;
            case 11:
                this.transform.Translate(Vector3.forward * con * Time.deltaTime);
                this.transform.rotation = Quaternion.Euler(0f, 45f, 0f);
                _anime.Walk();
                break;
            case 10:
                this.transform.Translate(Vector3.forward * con * Time.deltaTime);
                this.transform.rotation = Quaternion.Euler(0f, 90f, 0f);
                _anime.Walk();
                break;
            case 12:
                this.transform.Translate(Vector3.forward * con * Time.deltaTime);
                this.transform.rotation = Quaternion.Euler(0f,135f, 0f);
                _anime.Walk();
                break;
            case 2:
                this.transform.Translate(Vector3.forward * con * Time.deltaTime);
                this.transform.rotation = Quaternion.Euler(0f,180f, 0f);
                _anime.Walk();
                break;
            case 22:
                this.transform.Translate(Vector3.forward * con * Time.deltaTime);
                this.transform.rotation = Quaternion.Euler(0f, 225f, 0f);
                _anime.Walk();
                break;
            case 20:
                this.transform.Translate(Vector3.forward * con * Time.deltaTime);
                this.transform.rotation = Quaternion.Euler(0f, 270f, 0f);
                _anime.Walk();
                break;
            case 21:
                this.transform.Translate(Vector3.forward * con * Time.deltaTime);
                this.transform.rotation = Quaternion.Euler(0f, 315f, 0f);
                _anime.Walk();
                break;
        }
    }


}
