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();
    }
예제 #2
0
 private void Start()
 {
     sphereCollider        = GetComponent <SphereCollider>();
     sphereCollider.radius = (agentPropsScript.cooperationLenght * 2 + 1) * agentPropsScript.getSpeed();
 }