本文整理汇总了C++中Hotspot::setHotspotScript方法的典型用法代码示例。如果您正苦于以下问题:C++ Hotspot::setHotspotScript方法的具体用法?C++ Hotspot::setHotspotScript怎么用?C++ Hotspot::setHotspotScript使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Hotspot
的用法示例。
在下文中一共展示了Hotspot::setHotspotScript方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setBlockingHotspotScript
void Script::setBlockingHotspotScript(uint16 charId, uint16 scriptIndex, uint16 v3) {
Resources &r = Resources::getReference();
uint16 offset = r.getHotspotScript(scriptIndex);
if (charId == PLAYER_ID)
Room::getReference().setCursorState(CS_SEQUENCE);
Hotspot *hs = r.getActiveHotspot(charId);
hs->setHotspotScript(offset);
hs->currentActions().top().setAction(EXEC_HOTSPOT_SCRIPT);
hs->setOccupied(true);
}
示例2: setHotspotScript
void Script::setHotspotScript(uint16 hotspotId, uint16 scriptIndex, uint16 v3) {
Resources &res = Resources::getReference();
uint16 offset = res.getHotspotScript(scriptIndex);
Hotspot *hotspot = res.getActiveHotspot(hotspotId);
if (hotspot != NULL) {
hotspot->setHotspotScript(offset);
} else {
HotspotData *hs = res.getHotspot(hotspotId);
assert(hs);
hs->hotspotScriptOffset = offset;
}
}
示例3: transformPlayer
void Script::transformPlayer(uint16 v1, uint16 v2, uint16 v3) {
Resources &res = Resources::getReference();
HotspotData *hotspot = res.getHotspot(TRANSFORM_ID);
HotspotData *player = res.getHotspot(PLAYER_ID);
hotspot->roomNumber = player->roomNumber;
hotspot->startX = player->startX - 14;
hotspot->startY = player->startY - 10;
Hotspot *activeHotspot = res.activateHotspot(TRANSFORM_ID);
activeHotspot->setActionCtr(0);
activeHotspot->setHotspotScript(0x630);
}
示例4: makeGoewinWork
void Script::makeGoewinWork(uint16 v1, uint16 v2, uint16 v3) {
Resources &res = Resources::getReference();
Hotspot *goewin = res.getActiveHotspot(GOEWIN_ID);
assert(goewin);
goewin->updateMovement();
goewin->currentActions().addBack(EXEC_HOTSPOT_SCRIPT, 34);
goewin->setHotspotScript(0x616);
goewin->setDelayCtr(1500);
goewin->setTickProc(GOEWIN_SHOP_TICK_PROC);
// Set walk to position for Goewin whilst she's working
goewin->resource()->walkX = 179;
goewin->resource()->walkY = 138;
}