using System.Collections; using System.Collections.Generic; using UnityEngine; public class HumanMove : MonoBehaviour { public float fSpeed = 0.0f; Transform tr; // Use this for initialization void Start () { tr = transform; } // Update is called once per frame void Update () { tr.position += tr.forward * fSpeed * Time.deltaTime; } public void SetSpeed(float sp) { fSpeed = sp; } }