예제 #1
0
    // Use this for initialization
    void Start()
    {
        pos = transform.position;

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

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