I’m basically making a platforming game, and the platforms are exported into one class. There are currently 2 instances of the platform symbol in a movieclip which is the level. How would I load up the platforms class where it loads all the instances of the platform and load them into an array during the process?
This is the constructor of the class:
public function PlatformTest()
{
_top = GetTop();
_bottom = GetBottom();
_left = GetLeft();
_right = GetRight();
_platformList[_getSet.ListCntr] = this;
_getSet.ListCntr++;
}
I have private functions to get the x and y values for collision pruposes, and it loads into an array and is incremented by one. Is this the correct way of doing it?