本文整理汇总了C++中IActor::ToggleThirdPerson方法的典型用法代码示例。如果您正苦于以下问题:C++ IActor::ToggleThirdPerson方法的具体用法?C++ IActor::ToggleThirdPerson怎么用?C++ IActor::ToggleThirdPerson使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IActor
的用法示例。
在下文中一共展示了IActor::ToggleThirdPerson方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnGameplayCommand
void CDevMode::OnGameplayCommand(const char* cmd)
{
SUIArguments args;
args.SetDelimiter(":");
args.SetArguments(cmd);
string action;
args.GetArg(0, action);
if (action == "GotoTagPoint")
{
int tagpoint;
args.GetArg(1, tagpoint);
if (tagpoint >= 0 && tagpoint <= 11)
GotoTagPoint(tagpoint);
}
else if (action == "SetViewMode" && gEnv->pGame && gEnv->pGame->GetIGameFramework())
{
int mode;
args.GetArg(1, mode);
IActor* pPlayer = gEnv->pGame->GetIGameFramework()->GetClientActor();
static ICVar* pCamVar = gEnv->pConsole->GetCVar("cl_cam_orbit");
if (pPlayer && pCamVar)
{
switch (mode)
{
case 0:
pCamVar->Set(0);
if (pPlayer->IsThirdPerson())
pPlayer->ToggleThirdPerson();
break;
case 1:
pCamVar->Set(0);
if (!pPlayer->IsThirdPerson())
pPlayer->ToggleThirdPerson();
break;
case 2:
pCamVar->Set(1);
break;
}
}
}
else if (action == "SetFlyMode" && gEnv->pGame && gEnv->pGame->GetIGameFramework())
{
int mode;
args.GetArg(1, mode);
IActor* pPlayer = gEnv->pGame->GetIGameFramework()->GetClientActor();
if (pPlayer && mode >= 0 && mode < 3)
pPlayer->SetFlyMode(mode);
}
}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:50,代码来源:DevMode.cpp