Here is a simple solution:
Add a method which takes the level number integer. Then, depending on the
value of the level number, call the appropriate level function.
When level N is pressed, you call level(N)
class YourClassHavingLevelMethods
{
public static void level(int x)
{
A) Use reflection
B) There is this thing called polymorphism. Setup your array as
LevelHandler[] handlers = new LevelHandler[]{new Level0Handler(), new
Level1Handler(),...}
On 8 фев, 07:15, brian purgert brianpurge...@gmail.com wrote:
this should be simple for you guys but i,ve always been
2 matches
Mail list logo