Ok, so I've made a really basic 2D app that has a space ship at the bottom that moves around horizontally by using your finger. The objective of the game is to dodge falling missiles/ asteroids etc.
So my objective is to make it so the object 'SpaceJunk' is drawn off screen and randomly generated over and over again at different points on the X axis.
Thanks for any feedback, Joe
Code:
//HERE IS THE SPRITES ANIMATION AND SPAWN INFO
//*
//*
SpaceJunkImages = [[NSArray alloc] initWithObjects: [UIImage imageNamed:@"flash1.png"], [UIImage imageNamed:@"flash3.png"], [UIImage imageNamed:@"flash4.png"], [UIImage imageNamed:@"flash5.png"], [UIImage imageNamed:@"flash2.png"], nil];
SpaceJunk = [[UIImageView alloc] initWithFrame: CGRectMake (100, 220, 30, 30)];
SpaceJunk.animationDuration = 0.5;
SpaceJunk.contentMode = UIViewContentModeBottomLeft;
SpaceJunk.animationImages = SpaceJunkImages;
[SpaceJunk startAnimating];
[self.view addSubview:SpaceJunk];
//*
//*
So my objective is to make it so the object 'SpaceJunk' is drawn off screen and randomly generated over and over again at different points on the X axis.
Thanks for any feedback, Joe