Created
March 15, 2020 06:46
-
-
Save sknjpn/c871d74493dd42f44c410eddf17c1673 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Ball | |
{ | |
bool enabled = false; | |
Vec2 position; | |
} | |
Ball balls[100]; | |
void update() | |
{ | |
} | |
void addNewBall(Vec2 position) | |
{ | |
for(int i=0;i<100;++i) | |
{ | |
if(!balls[i].enabled) | |
{ | |
balls[i].enabled = true; | |
balls[i].position = position; | |
return; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment