Access another implementation files methods and plotting question
In Xcode/cocos2d/box2d I have methods in an .m file called Level1.m, and another in construct.mm. Is it possible to access level1s methods from construct?
Als开发者_高级运维o another question, how would an advanced programmer plot a level with x&y coords beyond the scope of the screen. For example a sidescrolling Mario type game?
For your first question.. Look up Inheritance, basic object oriented concept that allows you to utilize and override methods. If you don't want to inherit the class, then simply create an instance of it to use its methods.
As for your second question, I would pretend like the entire screen's coordinates takes up the entire level of your game, but while playing, zoom in (or scale) around the player so that the user can only see what's barely around the character.
精彩评论