Game Development Reference
In-Depth Information
What just happened?
I know. A lot of math and all at once! Thankfully, Cocos2d-x made it all much easier to
handle.
We just added the logic that allows the player to draw lines and set new pivot points for the
_rocket sprite.
The player will steer the _rocket sprite through the planets by giving the rocket a pivot
point to rotate around. And by releasing the _rocket from pivot points, the player will
make it move in a straight line again. All that logic gets managed here in the game's touch
events.
And don't worry about the math. Though understanding how to deal with vectors is a very
useful tool in any game developer's toolbox, and you should definitely research the topic,
there are countless games you can still build with little or no math; so cheer up!
Search WWH ::




Custom Search