Yes, there is a much better way than using NSUserDefaults!
You can simply access the array directly from your game. First, you must import level.h into game.m (for example: #import "level.h" ).
Now say that you want to enter the value of the number at index 0 in your array. you can do it this way: int myNumber = [[[name_of_level_class name_of_array] objectAtIndex:0] intValue];
A quick NSLog will prove that the integer myNumber will be equal to any number of your index 0 in an array of your level .m
source share