// Constructor to set the lengths for the whiskers, and the parameters needed to avoid walls public WallAvoider(float mainLength, float sideLength, Transform trans, float maxAccel) { this.mainRayLength = mainLength; this.sideRayLength = sideLength; this.transform = trans; this.maxAccel = maxAccel; this.fleer = new Fleer(0, trans, maxAccel); }
public CollisionAvoider(float collAvoidRad, Transform trans, Rigidbody2D rb2d, float maxAccel) { this.collisionAvoidanceRad = collAvoidRad; this.transform = trans; this.rigidBody = rb2d; this.maxAccel = maxAccel; this.fleer = new Fleer(0, transform, maxAccel); }