// protected void UpdateOnSurfaces() { // for (int side=0; side<NumSides; side++) { // Collider2D surfaceCollider = myWhiskers.GetSurfaceTouching(side); // float sideSpeed = GetSideSpeed(side); // bool isTouching = surfaceCollider!=null && sideSpeed>=0; // I'm "touching" this surface if it exists and I'm NOT moving *away* from it! // onSurfaces[side] = isTouching; //// if (onSurfaces[side] && !isTouching) { //// OnLeaveSurface(side, surfaceCollider); //// } //// else if (!onSurfaces[side] && isTouching) { //// OnTouchSurface(side, surfaceCollider); //// } // } // } virtual public void OnWhiskersTouchCollider(int side, Collider2D col) { Collidable collidable = GetCollidable(col); if (collidable != null) { collidable.OnCharacterTouchMe(side, this); } }