在Godot中导出LonnyLips游戏

要导出LonnyLips, 我们必须经历一些简单的过程或步骤。
首先, 我们必须从脚本文件中删除JSON代码。
例子:

extends Controlvar player_words=[]var current_story = {}onready var PlayerText= $VBoxContainer/HBoxContainer/PlayerTextonready var DisplayText= $VBoxContainer/DisplayTextfunc _ready(): set_current_story() DisplayText.text="Welcome all of u in the world of game and have a wondeful time!" check_player_words_length() PlayerText.grab_focus()func set_current_story(): randomize() var stories = $StoryBook.get_child_count() #Itis used for how many children u have as here are 4 children 0, 1, 2, 3. var selected_story=randi()%stories current_story.prompts= $StoryBook.get_child(selected_story).prompts current_story.story= $StoryBook.get_child(selected_story).storyfunc _on_PlayerText_text_entered(new_text): add_to_player_words()func _on_TextureButton_pressed(): if is_story_done():get_tree().reload_current_scene() else:add_to_player_words() func add_to_player_words(): player_words.append(PlayerText.text) DisplayText.text="" PlayerText.clear() check_player_words_length()func is_story_done(): return player_words.size() == current_story.prompts.size()func check_player_words_length(): if is_story_done():end_game() else:prompt_player()func tell_story(): DisplayText.text= current_story.story % player_wordsfunc prompt_player(): DisplayText.text += "May I have" +current_story.prompts[player_words.size()]+"please?"func end_game():PlayerText.queue_free() $VBoxContainer/HBoxContainer/Label.text="Again!" tell_story()

输出与以前相同, 但未使用JSON函数。
要导出项目, 我们必须单击” 项目” , 然后将其导出。
在Godot中导出LonnyLips游戏

文章图片
然后将打开以下页面。我们应该继续使用Windows桌面。
在Godot中导出LonnyLips游戏

文章图片
【在Godot中导出LonnyLips游戏】之后, 我们将展示如何按照当前文档顺序定义要订购的东西。在这里, 我们必须单击” 管理导出模板” 。
在Godot中导出LonnyLips游戏

文章图片
然后从这里下载:
在Godot中导出LonnyLips游戏

文章图片
单击官方3.1.1 [HTTPS]进行下载。下载需要5-10分钟。
在Godot中导出LonnyLips游戏

文章图片
在这里, 它下载成功。
在Godot中导出LonnyLips游戏

文章图片
要导出, 项目将名称命名为Lonny-Lips.zip并保存。
在Godot中导出LonnyLips游戏

文章图片
之后, 从res://中打开文件管理器以查看项目。
在Godot中导出LonnyLips游戏

文章图片
然后在文件管理器中, 有一个我们上面创建的文件(Lonny_Lips.zip)。
我们也可以从Lonny_Lips.zip示例中运行示例:, 也可以单击它。
我们已经成功导出了该应用程序。

    推荐阅读