If I create a class (NSObject) and make multiple objects from it (myObject1, myObject2). How would I refer to all of them at once, say if I want them all to make left 5px or check for collisions with an object.
If I create a class (NSObject) and make multiple objects from it (myObject1, myObject2). How would I refer to all of them at once, say if I want them all to make left 5px or check for collisions with an object.
Make an array, and put them in the array as you create them. Then you can use a loop to loop through all of the objects. Search for "NSArray example" or "NSMutableArray example".