How do prey and predator affect the resources in an environment?