so im not sure if this is a good or bad way to go about what i am doing but it seems to work the best for performance
array control is an array of tiles (children of this class) that make up the screen they all move in the same direction at the same rate i need code to ask the middle tile its type and oriantation to tell this class where or not to change direction.
if (ScreenManager.gS == GameContol.PLAY || ScreenManager.gS == GameContol.START)
{
for (a in arrayControl)
{
a.x += moveSpeedX;
a.y += moveSpeedY;
if (a.x == 160 && a.y == 240)
{
NewTile.typeReturn();
}
}
}
so my understanding is that typeReturn needs to be a static public function which can only take static variables but my understanding of the static keyword is, it will always be the same across the board eg. all my tiles orientations will be the same (change one they all change).
please reposed in a way a dyslexic kid can understand x