function - 如何在ue4中停止终端
问题描述
嗨,我在 UE4 中有一个非常简单的游戏,我猜我制作了静态网格并添加了终端,所以它现在显示,当玩家用完直播时它应该结束我得到它
void UBullCowCartridge::BeginPlay() // When the game starts
{
Super::BeginPlay();
PrintLine(TEXT("DEV: Slovo je: "));
PrintLine(TEXT("Riskuj"));
PrintLine(TEXT("Budes hadat slovo"));
PrintLine(TEXT("Mas 5 zivotu slovo je ISOGram (pismenka ve"));
PrintLine(TEXT("slove se neopakuji)"));
PrintLine(TEXT("pokud nejake pismeno bude dobre pricte se ti byk pokud nejake spatne pricte se ti"));
PrintLine(TEXT("krava"));
PrintLine(TEXT("Zacnes psat pomoci TAB tlacitka."));
HiddenWord = TEXT("Svoboda");
}
void UBullCowCartridge::OnInput(const FString& Input) // When the player hits enter
{
ClearScreen();
if(Input == HiddenWord)
{
PrintLine(TEXT("You win!"));
} else {
PrintLine(TEXT("You lose"));
--live;
}
if(live == 0) {
end();
}
}
解决方案
如果我理解正确,您想设置不可见的“终端”静态网格。在这种情况下,您可以这样做:
//don't forget cast the class containing mesh component
terminal_static_mesh_component->SetVisibility(false);
推荐阅读
- wordpress - WordPress 表单提交问题
- r - 将 exiftool 添加到使用 golem 构建的闪亮应用程序包中;收到错误消息“警告:系统错误:找不到‘exiftool’”
- python - 如何使用包创建左、右和中心框架?
- javascript - 如何将本地 jQuery 导入到 VS Code 扩展的 webview 中?
- python - 在 Django Rest Framework 中按属性或自定义字段对模型进行排序
- visual-studio-code - Visual Studio Code / VS Code:关闭光标行/当前行突出显示选项
- java - AutoValue 负检查
- javascript - 尝试在画布(JS)中更新计时器
- mysql - 加入所有 JSON 对象字符串值
- mysql - 使用 Docker Compose 从 Go REST API 连接 Mysql 时出错