From a82a7720cbc410826168901c039bf1972b7773ea Mon Sep 17 00:00:00 2001 From: Tiger Date: Fri, 23 Jan 2026 08:18:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9A=82=E6=97=B6=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=8D=A1=E7=89=8C=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project.godot | 2 +- scripts/autoload/MultiGame.gd | 1 - scripts/game/card.gd | 6 ++++++ scripts/game/game.gd | 6 ------ 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/project.godot b/project.godot index f8b0371..f3f4e22 100644 --- a/project.godot +++ b/project.godot @@ -10,7 +10,7 @@ config_version=5 [application] -config/name="PaperChemisGame" +config/name="纸片化学社区版:游戏本体" run/main_scene="uid://b2rokrdsjgx62" config/features=PackedStringArray("4.5", "GL Compatibility") config/icon="res://icon.svg" diff --git a/scripts/autoload/MultiGame.gd b/scripts/autoload/MultiGame.gd index c2f63f5..e97a7a8 100644 --- a/scripts/autoload/MultiGame.gd +++ b/scripts/autoload/MultiGame.gd @@ -1,6 +1,5 @@ extends Node - # 基于 ENet 多人游戏 func create_server(player_num: int) -> void: diff --git a/scripts/game/card.gd b/scripts/game/card.gd index e6c65a7..6214032 100644 --- a/scripts/game/card.gd +++ b/scripts/game/card.gd @@ -1,5 +1,11 @@ extends Node2D +var description: String +var type: String + func set_texture(pic: String) -> void: $Sprite.texture = ResourceLoader.load(pic) +func set_card(card_name: String) -> void: + print(card_name) + set_texture(GameManager.pic_list[card_name]) \ No newline at end of file diff --git a/scripts/game/game.gd b/scripts/game/game.gd index 75591a3..0f5d985 100644 --- a/scripts/game/game.gd +++ b/scripts/game/game.gd @@ -16,9 +16,3 @@ func init() -> void: ipaddress = address $IPLabel.text = ipaddress $Player1/Username.text = GameManager.username - -func new_card(card_name: String): - var card = SceneManager.Card.new() - add_child(card) - card.set_texture(GameManager.pic_list[card_name]) - return card \ No newline at end of file