feat: 优化项目结构,更新引擎版本
This commit is contained in:
@@ -19,11 +19,11 @@ game/
|
||||
- translation/
|
||||
- trans.csv
|
||||
- scenes/
|
||||
- main_menu.tscn
|
||||
- game.tscn
|
||||
- settings.tscn
|
||||
- prefabs/
|
||||
- menus/
|
||||
- main_menu.tscn
|
||||
- settings.tscn
|
||||
- game/
|
||||
- game.tscn
|
||||
- card.tscn
|
||||
- scripts/
|
||||
- autoload/
|
||||
@@ -48,7 +48,7 @@ game/
|
||||
|
||||
## 最佳实践
|
||||
|
||||
本项目目前正在使用 Godot 4.6.1 进行开发。开发用语言为 GDScript。
|
||||
本项目目前正在使用 Godot 4.6.2 进行开发。开发用语言为 GDScript。
|
||||
|
||||
你的开发应当遵循 Godot 引擎提供的[最佳实践](https://docs.godotengine.org/zh-cn/4.x/tutorials/best_practices/)及[GDScript 编写风格指南](https://docs.godotengine.org/zh-cn/4.x/tutorials/scripting/gdscript/gdscript_styleguide.html)。但下面提到的除外:
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
extends Node2D
|
||||
|
||||
var CardScene = preload("res://prefabs/game/card.tscn")
|
||||
var CardScene = preload("res://scenes/game/card.tscn")
|
||||
|
||||
var card_list: Array
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ func _on_create_game_button_pressed() -> void:
|
||||
if 2 <= player_num and player_num <= 4:
|
||||
MultiGame.create_server(int(player_num))
|
||||
$".".hide()
|
||||
SceneManager.goto_scene("game")
|
||||
SceneManager.goto_scene("game/game")
|
||||
else:
|
||||
$Warn.show()
|
||||
|
||||
|
||||
@@ -5,4 +5,4 @@ func _on_join_game_button_pressed() -> void:
|
||||
var ip: String = $JoinGameEdit.text
|
||||
MultiGame.create_client(ip)
|
||||
$".".hide()
|
||||
SceneManager.goto_scene("game")
|
||||
SceneManager.goto_scene("game/game")
|
||||
|
||||
@@ -8,7 +8,7 @@ func _on_start_game_pressed() -> void:
|
||||
$CreateGameUI.show()
|
||||
|
||||
func _on_setting_button_pressed() -> void:
|
||||
SceneManager.goto_scene("settings")
|
||||
SceneManager.goto_scene("menus/settings")
|
||||
|
||||
func _on_quit_game_pressed() -> void:
|
||||
get_tree().quit()
|
||||
|
||||
@@ -25,7 +25,7 @@ func _on_save_button_pressed() -> void:
|
||||
|
||||
|
||||
func _on_cancel_button_pressed() -> void:
|
||||
SceneManager.goto_scene("main_menu")
|
||||
SceneManager.goto_scene("menus/main_menu")
|
||||
|
||||
|
||||
func _on_download_button_pressed() -> void:
|
||||
|
||||
Reference in New Issue
Block a user