Referring to this link "http://recruit.gmo.jp/engineer/jisedai/blog/cocos2d-x_photon/", I'm trying to run the sample that display simple networking feature using cocos2dx 2.2.6 and photon sdk v4-0-0-5. The guide suggested implementing customEventAction this way:
void NetworkLogic::customEventAction(int playerNr, nByte eventCode, const ExitGames::Common::Object& eventContent)
{
ExitGames::Common::Hashtable* event;
switch (eventCode) {
case 1:
event = ExitGames::Common::ValueObject<ExitGames::Common::Hashtable*>(eventContent).getDataCopy();
float x = ExitGames::Common::ValueObject(event->getValue(1)).getDataCopy();
float y = ExitGames::Common::ValueObject(event->getValue(2)).getDataCopy();
eventQueue.push({static_cast(playerNr), x, y});
break;
}
}
Xcode gave error that says:
Cannot refer to class template "ValueObject" without a template argument list
I'm not familiar with templates myself, could anyone suggest a proper method that could allows me to extract event data so that it could be push to eventQueue? Or pointing out what have been wrong in the code above. Many thanks in advance!