public void init() { //set ref agentPropsScript = GetComponent <AgentProps>(); GameObject managerGO = Ref.getManagerGO(); managerScript = managerGO.GetComponent <Manager>(); followPathScript = GetComponent <FollowPath>(); gridScript = Ref.getGridScript(); grid = gridScript.getGrid(); windowLenght = agentPropsScript.cooperationLenght * 2; float agentSpeed = agentPropsScript.getSpeed(); }
private void Start() { sphereCollider = GetComponent <SphereCollider>(); sphereCollider.radius = (agentPropsScript.cooperationLenght * 2 + 1) * agentPropsScript.getSpeed(); }