本文整理汇总了C++中aurora::nwscript::Object类的典型用法代码示例。如果您正苦于以下问题:C++ Object类的具体用法?C++ Object怎么用?C++ Object使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Object类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getTag
void Functions::getTag(Aurora::NWScript::FunctionContext &ctx) {
ctx.getReturn().getString().clear();
Aurora::NWScript::Object *object = getParamObject(ctx, 0);
if (object)
ctx.getReturn() = object->getTag();
}
示例2: getTag
void Functions::getTag(Aurora::NWScript::FunctionContext &ctx) {
ctx.getReturn().getString().clear();
Aurora::NWScript::Object *object = getParamObject(ctx, 0);
// PCs don't have a tag, and the scripts depend on that
if (object == _game->getModule().getPC())
object = 0;
if (object)
ctx.getReturn() = object->getTag();
}
示例3: setLocalFloat
void Functions::setLocalFloat(Aurora::NWScript::FunctionContext &ctx) {
Aurora::NWScript::Object *object = getParamObject(ctx, 0);
if (object)
object->setVariable(ctx.getParams()[1].getString(), ctx.getParams()[2].getFloat());
}
示例4: getLocalObject
void Functions::getLocalObject(Aurora::NWScript::FunctionContext &ctx) {
Aurora::NWScript::Object *object = getParamObject(ctx, 0);
if (object)
ctx.getReturn() = object->getVariable(ctx.getParams()[1].getString(), kTypeObject).getObject();
}
示例5: setLocalItemProperty
void Functions::setLocalItemProperty(Aurora::NWScript::FunctionContext &ctx) {
Aurora::NWScript::Object *object = getParamObject(ctx, 0);
if (object)
object->setVariable(ctx.getParams()[1].getString(), ctx.getParams()[2].getEngineType());
}
示例6: getLocalItemProperty
void Functions::getLocalItemProperty(Aurora::NWScript::FunctionContext &ctx) {
Aurora::NWScript::Object *object = getParamObject(ctx, 0);
if (object)
ctx.getReturn() = object->getVariable(ctx.getParams()[1].getString(), kTypeEngineType).getEngineType();
}