how can the environment affect the life cycle of arganisms.​