public PathRequest GetPath(Vector3 from, Vector3 to, RobotMovementController controller) { PathRequest request = new PathRequest() { from = from, to = to, isCalculating = true, controller = controller }; requests.Enqueue(request); return(request); }
override internal void Awake() { base.Awake(); pathfinding = GetComponent <RobotMovementController>(); if (pathfinding == null) { Debug.LogWarning("No RobotMovementController found on " + gameObject.name + ". One has been added automatically, but consider adding one manually so that it may be optimally configured."); pathfinding = gameObject.AddComponent <RobotMovementController>(); } }
void Start() { rigidbody = GetComponent <Rigidbody>(); movementController = GetComponent <RobotMovementController>(); }