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

public class PlayerGirl : MonoBehaviour
{


    public GameObject PlayerGirlCharacter;
    public bool isRunning;
    public float horizontalMove;
    public float verticalMove;

    void Update()
    {
        if (Input.GetButton("Horizontal") || Input.GetButton("Vertical"))
        {
            PlayerGirlCharacter.GetComponent<Animator>().Play("PlayerGirlWalk");
            horizontalMove = Input.GetAxis("Horizontal") * Time.deltaTime * 150;
            verticalMove = Input.GetAxis("Vertical") * Time.deltaTime * 8;
            isRunning = true;
            transform.Rotate(0, horizontalMove, 0);
            transform.Translate(0, 0, verticalMove);
        }

        else
        {
            PlayerGirlCharacter.GetComponent<Animator>().Play("PlayerGirlIdle");
            isRunning = false;
        }
    }
}
