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

public class Person : MonoBehaviour
{
    // Start is called before the first frame update
    public bool ring;
    
    // public Animator animator;
    private string animName = "walkAnim";
    public Rigidbody person;

    private float moveSpeed = 15f;

    
    private bool run = false;
    private bool walk = true;

    private Vector3 currentLocation;

    private Vector3 step=new Vector3(1f,0f,0f);

    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {
        if (run == true)
        {
            moveSpeed = 6f;
            animName = "Run";
        }
        else
        {
            if (walk == true)
            {
                moveSpeed = 3f;
                animName = "Walk";
            }
            else
            {
                moveSpeed = 0f;
                animName = "Ring";
            }
        }
        person.transform.position+=(step*moveSpeed)*Time.deltaTime;



    }
}
