Skip to content

Instantly share code, notes, and snippets.

@beakr
Created April 26, 2014 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beakr/11324471 to your computer and use it in GitHub Desktop.
Save beakr/11324471 to your computer and use it in GitHub Desktop.
for (int i = 0; i < spawnedFish.size(); i++) {
IND_Entity2d * fish = spawnedFish.at(i);
for (int j = 0; j < 20; j++) {
if ((x - j) == fish->getPosX()) {
x -= 10;
}
else if ((x + j) == fish->getPosX()) {
x += 10;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment