//============================================================================== // IOHIDEvent::initWithTypeTimeStamp //============================================================================== bool IOHIDEvent::initWithTypeTimeStamp(IOHIDEventType type, AbsoluteTime timeStamp, IOOptionBits options, IOByteCount additionalCapacity) { if ( !initWithType(type, additionalCapacity)) return false; _timeStamp = timeStamp; _options = options; _data->options = options; return true; }
Skill *Skill::create(Skills sk,Creature * cr) { if (!sk.isAble) return nullptr; auto skill = new Skill(); if (skill&&skill->initWithType(sk,cr)) { skill->autorelease(); return skill; } CC_SAFE_DELETE(skill); return nullptr; }
//============================================================================== // IOHIDEvent::setType //============================================================================== void IOHIDEvent::setType(IOHIDEventType type) { initWithType(type); }
bool Piece::initWithSymbol(char c) { return initWithType(_symbolMap.at(c).first, _symbolMap.at(c).second); }