Open Isaac-W opened 9 years ago
Assigned to @sanderzinc to cooperate with @DocDerwin in implementing this.
Isaac committed some boiler plate classes to get you guys started with this.
The Cursor class also needs to subclass/inherit from cocos2d::Node, as it is also a visible element on the screen. See issue #8 for more details regarding Nodes.
I think that it would be a good idea if @sanderzinc posts any relevant details regarding the implementation of the Cursor class, and then @DocDerwin can work on coding it up.
I have added some additional tasks to the original issue.
Awesome. Trenton and I will get on it.
Sent from my Windows Phone
From: Isaac Wangmailto:notifications@github.com Sent: 12/16/2014 6:26 PM To: SPUDevelopers/Naturalizemailto:Naturalize@noreply.github.com Cc: Doc Derwinmailto:docderwin@hotmail.com Subject: Re: [Naturalize] Add movable cursor (#9)
I have added some additional tasks to the original issue.
Reply to this email directly or view it on GitHub: https://github.com/SPUDevelopers/Naturalize/issues/9#issuecomment-67268477
One thing I just noticed is that the cursor init function is written in the header file. Normally, this is not a good place to put it. We should be declaring the init function in the header and defining it in the .cpp. See the other classes for more info. Would you mind making those changes for your next pull request?
Because the Cursor inherits from Node, it has its own internal position. We don't actually need to create two instance variables for the xy coordinates. However, the methods stay the same, because we want the game to use the cursor in terms of map tiles, not internal coordinates.
The Cursor class should be updated to use the internal Node (this->setPosition() & this->getPosition()) methods instead of keeping track of it ourselves.
Implement class; it should contain the position of the cursor, on-screen drawing details, etc.
The cursor class should also have methods to handle moving of the cursor, like moveToXY(). These methods will be called by the main game scene.
Open Tasks:
Move init method to cpp fileMake the map grid tile size (128px) an arbitrary number (see issue #21)