Open teoman002 opened 5 years ago
* It is not yet possible, to tell the class.cpp constructor to initialize a character on creation, because a class instance is not created with every new character instance.
IClass should only be used as a base class thus it cannot contain CCharacter instances.
* InfC classes had always direct access to its character. In contrast to that, InfCroya has no direct access, it needs pointer. That makes porting a lot harder.
In 0.6 infc, each class was defined inside CCharacter in many different places and not only there, which was terrible in my opinion.
* I wanted to give class.cpp a Tick() method, which handles double jumps. Instead I had to write it into croyaplayer.cpp, because class.cpp didn't run the Tick() method properly, neither did hunter. Maybe here I made a mistake in the implementation.
This is how should it be done to "fix" the issue. Create a IClass::Tick(CCharacter* pChr) virtual function that will be called from inside CroyaPlayer::Tick(). I will try make one now.
For some complicated classes I think it will be acceptable to write class features outside of IClass child class (example)
Thanks for your commit showing me, how the code is intended! :)
todo fix bugs, make code in src/infcroya/* cleaner, document newly added classes in headers (comment out) for future easy contributions/forks
class.cpp is for croyaplayer.cpp, what character.cpp is for player.cpp, however class.cpp is just a helper class containing no information about the character, which means the character has to be passed to each helper method of hunter.cpp.
This introduced problems with hunter implementation:
What can be improved?