本文整理汇总了C++中aurora::nwscript::FunctionContext::getParams方法的典型用法代码示例。如果您正苦于以下问题:C++ FunctionContext::getParams方法的具体用法?C++ FunctionContext::getParams怎么用?C++ FunctionContext::getParams使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类aurora::nwscript::FunctionContext
的用法示例。
在下文中一共展示了FunctionContext::getParams方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: random
void Functions::random(Aurora::NWScript::FunctionContext &ctx) {
ctx.getReturn() = std::rand() % ctx.getParams()[0].getInt();
}
示例2: getStringByStrRef
void Functions::getStringByStrRef(Aurora::NWScript::FunctionContext &ctx) {
const uint32 strRef = (uint32) ctx.getParams()[0].getInt();
const Aurora::LanguageGender gender = (Aurora::LanguageGender) ctx.getParams()[1].getInt();
ctx.getReturn() = TalkMan.getString(strRef, gender);
}
示例3: printInteger
void Functions::printInteger(Aurora::NWScript::FunctionContext &ctx) {
status("Witcher: %d", ctx.getParams()[0].getInt());
}
示例4: stringToInt
void Functions::stringToInt(Aurora::NWScript::FunctionContext &ctx) {
int32 i = 0;
Common::parseString(ctx.getParams()[0].getString(), i);
ctx.getReturn() = i;
}
示例5: getStringLength
void Functions::getStringLength(Aurora::NWScript::FunctionContext &ctx) {
ctx.getReturn() = (int32) ctx.getParams()[0].getString().size();
}
示例6: printToLogWindow
void Functions::printToLogWindow(Aurora::NWScript::FunctionContext &ctx) {
status("DragonAge: LOG(%s): %s", ctx.getParams()[1].getString().c_str(),
ctx.getParams()[0].getString().c_str());
}
示例7: intToString
void Functions::intToString(Aurora::NWScript::FunctionContext &ctx) {
ctx.getReturn() = Common::composeString(ctx.getParams()[0].getInt());
}
示例8: printObject
void Functions::printObject(Aurora::NWScript::FunctionContext &ctx) {
Aurora::NWScript::Object *object = ctx.getParams()[0].getObject();
status("KotOR: object<%s,%p)", Aurora::NWScript::formatTag(object).c_str(), static_cast<void *>(object));
}
示例9: printObject
void Functions::printObject(Aurora::NWScript::FunctionContext &ctx) {
Aurora::NWScript::Object *object = ctx.getParams()[0].getObject();
status("DragonAge: object<%s,%p)", Aurora::NWScript::formatTag(object).c_str(), (void *) object);
}
示例10: actionSpeakString
void Functions::actionSpeakString(Aurora::NWScript::FunctionContext &ctx) {
NWN2::Object *object = NWN2::ObjectContainer::toObject(ctx.getCaller());
if (object)
object->speakString(ctx.getParams()[0].getString(), ctx.getParams()[1].getInt());
}
示例11: getStringByStrRef
void Functions::getStringByStrRef(Aurora::NWScript::FunctionContext &ctx) {
const uint32 strRef = (uint32) ctx.getParams()[0].getInt();
ctx.getReturn() = TalkMan.getString(strRef);
}
示例12: vector
void Functions::vector(Aurora::NWScript::FunctionContext &ctx) {
ctx.getReturn().setVector(ctx.getParams()[0].getFloat(),
ctx.getParams()[1].getFloat(),
ctx.getParams()[2].getFloat());
}
示例13: floatToInt
void Functions::floatToInt(Aurora::NWScript::FunctionContext &ctx) {
ctx.getReturn() = (int32) ctx.getParams()[0].getFloat();
}
示例14: intToFloat
void Functions::intToFloat(Aurora::NWScript::FunctionContext &ctx) {
ctx.getReturn() = (float) ctx.getParams()[0].getInt();
}
示例15: printWarning
void Functions::printWarning(Aurora::NWScript::FunctionContext &ctx) {
status("DragonAge: WARNING: %s", ctx.getParams()[0].getString().c_str());
}