Ejemplo n.º 1
0
    void Update()
    {
        velocity += SteeringBehaviour.Seek(this, target, 2f);
        if (type == INSIDE_TYPE.CIRCLE)
        {
            velocity += SteeringBehaviour.InsideCircle(this, start_pos, radius, target);
        }
        if (type == INSIDE_TYPE.RECTANGLE)
        {
        }
        velocity += SteeringBehaviour.InsideRectangle(this, start_pos, limitX, limitY, target);

        transform.position += velocity * Time.deltaTime;
    }