public void previous(body_parts part) { switch (part) { case body_parts.hair: if (hair_id > 0) { hair_id--; } else { hair_id = hair_length; } break; case body_parts.eyes: if (eyes_id > 0) { eyes_id--; } else { eyes_id = eyes_length; } break; case body_parts.nose: if (nose_id > 0) { nose_id--; } else { nose_id = nose_length; } break; case body_parts.mouth: if (mouth_id > 0) { mouth_id--; } else { mouth_id = mouth_length; } break; case body_parts.body: if (body_id > 0) { body_id--; } else { body_id = body_length; } break; } updateLook(); }
public void next(body_parts part) { switch (part) { case body_parts.hair: if (hair_id < hair_length) { hair_id++; } else { hair_id = 0; } break; case body_parts.eyes: if (eyes_id < eyes_length) { eyes_id++; } else { eyes_id = 0; } break; case body_parts.nose: if (nose_id < nose_length) { nose_id++; } else { nose_id = 0; } break; case body_parts.mouth: if (mouth_id < mouth_length) { mouth_id++; } else { mouth_id = 0; } break; case body_parts.body: if (body_id < body_length) { body_id++; } else { body_id = 0; } break; } updateLook(); }