本文整理汇总了C++中Core::DisplayMessage方法的典型用法代码示例。如果您正苦于以下问题:C++ Core::DisplayMessage方法的具体用法?C++ Core::DisplayMessage怎么用?C++ Core::DisplayMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Core
的用法示例。
在下文中一共展示了Core::DisplayMessage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FindObject
//.........这里部分代码省略.........
case 0x65:
{
/* 101 FlyToPoint(Point, Time) */
if (thisActor != NULL && thisActor->IsInterruptable()) {
FlyTo* flyTo = new FlyTo(thisActor, act->where, act->integer1);
thisActor->AddAction(flyTo);
}
break;
}
case 111:
{
/* DESTROYSELF() (111 0x6f) */
// TODO: Delete it for real
fTarget.Target()->SetStale(true);
return false;
}
case 0x73:
{
/* SETGLOBALTIMER(S:NAME*,S:AREA*,I:TIME*GTIMES) (115 0x73)*/
std::string timerName;
// TODO: We append the timer name to the area name,
// check if it's okay
timerName.append(act->string2).append(act->string1);
GameTimer::Add(timerName.c_str(), act->integer1);
break;
}
case 0x97:
{
/* 151 DisplayString(O:Object*,I:StrRef*)
* This action displays the strref specified by the StrRef parameter
* in the message window, attributing the text to
* the specified object.
*/
core->DisplayMessage(act->integer1);
break;
}
case 0xA7:
{
core->PlayMovie(act->string1);
break;
}
case 134:
{
/* AttackReevaluate(O:Target*,I:ReevaluationPeriod*)
* (134 0x86)
*/
Actor* targetActor = dynamic_cast<Actor*>(FindObject(act));
if (thisActor != NULL && targetActor != NULL) {
IE::point point = targetActor->NearestPoint(thisActor->Position());
WalkTo* walkToAction = new WalkTo(thisActor, point);
thisActor->AddAction(walkToAction);
Attack* attackAction = new Attack(thisActor, targetActor);
thisActor->AddAction(attackAction);
}
break;
}
case 198: // 0xc6
{
/* STARTDIALOGNOSET(O:OBJECT*) (198 0xc6) */
// TODO: Implement more correctly.
Actor* actor = dynamic_cast<Actor*>(FindObject(act));
if (actor != NULL) {
Dialogue* dialogueAction = new Dialogue(thisActor, actor);
thisActor->AddAction(dialogueAction);