本文整理汇总了C++中aurora::nwscript::FunctionContext类的典型用法代码示例。如果您正苦于以下问题:C++ FunctionContext类的具体用法?C++ FunctionContext怎么用?C++ FunctionContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FunctionContext类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: random
void Functions::random(Aurora::NWScript::FunctionContext &ctx) {
ctx.getReturn() = getRandom(0, ctx.getParams()[0].getInt() - 1);
}
开发者ID:clone2727,项目名称:xoreos,代码行数:3,代码来源:functions_math.cpp
示例2: intToFloat
void Functions::intToFloat(Aurora::NWScript::FunctionContext &ctx) {
ctx.getReturn() = (float) ctx.getParams()[0].getInt();
}
开发者ID:berenm,项目名称:xoreos,代码行数:3,代码来源:functions_math.cpp
示例3: vector
void Functions::vector(Aurora::NWScript::FunctionContext &ctx) {
ctx.getReturn().setVector(ctx.getParams()[0].getFloat(),
ctx.getParams()[1].getFloat(),
ctx.getParams()[2].getFloat());
}
开发者ID:berenm,项目名称:xoreos,代码行数:5,代码来源:functions_math.cpp
示例4: setGlobalNumber
void Functions::setGlobalNumber(Aurora::NWScript::FunctionContext &ctx) {
Common::UString id = ctx.getParams()[0].getString();
int value = ctx.getParams()[1].getInt();
_game->getModule().setGlobalNumber(id, value);
}
开发者ID:berenm,项目名称:xoreos,代码行数:6,代码来源:functions_global.cpp
示例5: actionSpeakString
void Functions::actionSpeakString(Aurora::NWScript::FunctionContext &ctx) {
NWN::Object *object = NWN::ObjectContainer::toObject(ctx.getCaller());
if (object)
object->speakString(ctx.getParams()[0].getString(), ctx.getParams()[1].getInt());
}
开发者ID:Supermanu,项目名称:xoreos,代码行数:6,代码来源:functions_action.cpp
示例6: printString
void Functions::printString(Aurora::NWScript::FunctionContext &ctx) {
status("NWN2: %s", ctx.getParams()[0].getString().c_str());
}
开发者ID:Siltala,项目名称:xoreos,代码行数:3,代码来源:functions_string.cpp
示例7: objectToString
void Functions::objectToString(Aurora::NWScript::FunctionContext &ctx) {
Aurora::NWScript::Object *object = ctx.getParams()[0].getObject();
ctx.getReturn() = Common::UString::format("object<%s,%p)", formatTag(object).c_str(), (void *) object);
}
开发者ID:Siltala,项目名称:xoreos,代码行数:5,代码来源:functions_string.cpp
示例8: musicBackgroundGetNightTrack
void Functions::musicBackgroundGetNightTrack(Aurora::NWScript::FunctionContext &ctx) {
Area *area = NWN2::ObjectContainer::toArea(getParamObject(ctx, 0));
ctx.getReturn() = area ? (int32)area->getMusicNightTrack() : -1;
}
开发者ID:Supermanu,项目名称:xoreos,代码行数:5,代码来源:functions_sound.cpp
示例9: musicBackgroundChangeNight
void Functions::musicBackgroundChangeNight(Aurora::NWScript::FunctionContext &ctx) {
Area *area = NWN2::ObjectContainer::toArea(getParamObject(ctx, 0));
if (area)
area->setMusicNightTrack(ctx.getParams()[1].getInt());
}
开发者ID:Supermanu,项目名称:xoreos,代码行数:5,代码来源:functions_sound.cpp
示例10: getTimeMinute
void Functions::getTimeMinute(Aurora::NWScript::FunctionContext &ctx) {
ctx.getReturn() = static_cast<int32>((EventMan.getTimestamp() / 1000) / 60);
}
开发者ID:mirv-sillyfish,项目名称:xoreos,代码行数:3,代码来源:functions_time.cpp
示例11: getTimeMillisecond
void Functions::getTimeMillisecond(Aurora::NWScript::FunctionContext &ctx) {
ctx.getReturn() = static_cast<int32>(EventMan.getTimestamp());
}
开发者ID:mirv-sillyfish,项目名称:xoreos,代码行数:3,代码来源:functions_time.cpp
示例12: writeTimestampedLogEntry
void Functions::writeTimestampedLogEntry(Aurora::NWScript::FunctionContext &ctx) {
const Common::UString tstamp = Common::DateTime(Common::DateTime::kUTC).formatDateTimeISO('T', '-', ':');
status("NWN2: %s: %s", tstamp.c_str(), ctx.getParams()[0].getString().c_str());
}
开发者ID:clone2727,项目名称:xoreos,代码行数:5,代码来源:functions_string.cpp
示例13: getIsOpen
void Functions::getIsOpen(Aurora::NWScript::FunctionContext &ctx) {
Situated *situated = ObjectContainer::toSituated(getParamObject(ctx, 0));
ctx.getReturn() = situated ? situated->isOpen() : 0;
}
开发者ID:Supermanu,项目名称:xoreos,代码行数:5,代码来源:functions_situated.cpp
示例14: setLocked
void Functions::setLocked(Aurora::NWScript::FunctionContext &ctx) {
Situated *situated = ObjectContainer::toSituated(getParamObject(ctx, 0));
if (situated)
situated->setLocked(ctx.getParams()[1].getInt() != 0);
}
开发者ID:Supermanu,项目名称:xoreos,代码行数:5,代码来源:functions_situated.cpp
示例15: 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);
}
开发者ID:Siltala,项目名称:xoreos,代码行数:6,代码来源:functions_string.cpp
示例16: intToString
void Functions::intToString(Aurora::NWScript::FunctionContext &ctx) {
ctx.getReturn() = Common::composeString(ctx.getParams()[0].getInt());
}
开发者ID:Siltala,项目名称:xoreos,代码行数:3,代码来源:functions_string.cpp
示例17: printInteger
void Functions::printInteger(Aurora::NWScript::FunctionContext &ctx) {
status("NWN2: %d", ctx.getParams()[0].getInt());
}
开发者ID:Siltala,项目名称:xoreos,代码行数:3,代码来源:functions_string.cpp
示例18: intToHexString
void Functions::intToHexString(Aurora::NWScript::FunctionContext &ctx) {
ctx.getReturn() = Common::UString::format("0x%08x", (uint32) ctx.getParams()[0].getInt());
}
开发者ID:Siltala,项目名称:xoreos,代码行数:3,代码来源:functions_string.cpp
示例19: printObject
void Functions::printObject(Aurora::NWScript::FunctionContext &ctx) {
Aurora::NWScript::Object *object = ctx.getParams()[0].getObject();
status("NWN2: object<%s,%p)", formatTag(object).c_str(), (void *) object);
}
开发者ID:Siltala,项目名称:xoreos,代码行数:5,代码来源:functions_string.cpp
示例20: stringToInt
void Functions::stringToInt(Aurora::NWScript::FunctionContext &ctx) {
int32 i = 0;
Common::parseString(ctx.getParams()[0].getString(), i);
ctx.getReturn() = i;
}
开发者ID:Siltala,项目名称:xoreos,代码行数:6,代码来源:functions_string.cpp
注:本文中的aurora::nwscript::FunctionContext类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论