Game Development Reference
In-Depth Information
CGPoint coinFinalPosition =
CGPointMake(coinFinalPositionX, coinFinalPositionY);
• Now the collectable is ready to be added to the scene. But for multiple coins to be
added moving left to right on the scene, a timer has to be implemented. The timer
looks like this:
if( currentTime - self.lastCoinAdded > 1)
{
self.lastCoinAdded = currentTime + 1;
[self addCoin];
}
After all these implementations, multiple coins are seen moving from left to right as
shown in the following screenshot:
Search WWH ::




Custom Search