// Use this for initialization
    void Start()
    {
        pos = transform.position;

        polyRef = steeringManager.GetClosestPolygon(pos);
        steeringManager.IncrNumObjectsInPolygon(polyRef);
    }
Beispiel #2
0
    void Awake()
    {
        if (steeringManager != null && !steeringManager.isInitialized())
        {
            steeringManager.Initialize();
        }

        prevPos = transform.position;
        if (steeringManager != null)
        {
            polyRef = steeringManager.GetClosestPolygon(prevPos);
            steeringManager.IncrNumObjectsInPolygon(polyRef);
        }
    }