public float getValidMovementY(float orSmallerInput) { if (orSmallerInput > 0) { if (rUp == null) { Debug.Log("rUp is null"); return(orSmallerInput); } if (rUp.isHit()) { return(rUp.getAllowableSpeed()); } return(orSmallerInput); } if (rDown == null) { Debug.Log("rDown is null"); return(orSmallerInput); } if (rDown.isHit()) { return(rDown.getAllowableSpeed()); } return(orSmallerInput); }
public float getValidMovementX(float orSmallerInput) { if (rX == null) { return(orSmallerInput); } return(getSmallest(rX.getAllowableSpeed(), orSmallerInput)); }