feat: 初步搭建游戏界面UI
This commit is contained in:
@@ -42,6 +42,27 @@ theme_override_fonts/font = ExtResource("1_uwrxv")
|
||||
theme_override_font_sizes/font_size = 35
|
||||
text = "Player1"
|
||||
|
||||
[node name="CardAreaPanel" type="PanelContainer" parent="Player1" unique_id=881125453]
|
||||
offset_left = 525.0
|
||||
offset_top = 1194.0
|
||||
offset_right = 1967.0
|
||||
offset_bottom = 1400.0
|
||||
|
||||
[node name="ReactionAreaPanel" type="PanelContainer" parent="Player1" unique_id=1328772147]
|
||||
offset_left = 530.0
|
||||
offset_top = 700.0
|
||||
offset_right = 1972.0
|
||||
offset_bottom = 1139.0
|
||||
|
||||
[node name="Label" type="Label" parent="Player1" unique_id=739321767]
|
||||
offset_left = 71.0
|
||||
offset_top = 1292.0
|
||||
offset_right = 352.0
|
||||
offset_bottom = 1353.0
|
||||
theme_override_fonts/font = ExtResource("1_uwrxv")
|
||||
theme_override_font_sizes/font_size = 35
|
||||
text = "HP: 5"
|
||||
|
||||
[node name="Player2" type="Node2D" parent="." unique_id=1559551502]
|
||||
|
||||
[node name="Username" type="Label" parent="Player2" unique_id=1130366682]
|
||||
@@ -52,3 +73,18 @@ offset_bottom = 94.0
|
||||
theme_override_fonts/font = ExtResource("1_uwrxv")
|
||||
theme_override_font_sizes/font_size = 35
|
||||
text = "Player2"
|
||||
|
||||
[node name="ReactionAreaPanel" type="PanelContainer" parent="Player2" unique_id=470786359]
|
||||
offset_left = 525.0
|
||||
offset_top = 15.0
|
||||
offset_right = 1967.0
|
||||
offset_bottom = 425.0
|
||||
|
||||
[node name="Label" type="Label" parent="Player2" unique_id=1027772856]
|
||||
offset_left = 2127.0
|
||||
offset_top = 104.0
|
||||
offset_right = 2333.0
|
||||
offset_bottom = 165.0
|
||||
theme_override_fonts/font = ExtResource("1_uwrxv")
|
||||
theme_override_font_sizes/font_size = 35
|
||||
text = "HP: 5"
|
||||
|
||||
@@ -101,22 +101,30 @@ func setup_deal_card() -> void:
|
||||
func round_deal_card(id: int) -> void:
|
||||
if card_order.find(id) == -1: return
|
||||
if game_round == 1 and card_order.find(id) <= 2:
|
||||
for i in range(3):
|
||||
for _i in range(3):
|
||||
var card: String = random_card()
|
||||
if card == "": return
|
||||
players_data[id]["cards"].append(card)
|
||||
else:
|
||||
for i in range(2):
|
||||
for _i in range(2):
|
||||
var card: String = random_card()
|
||||
if card == "": return
|
||||
players_data[id]["cards"].append(card)
|
||||
|
||||
|
||||
func reaction_settle(id: int) -> void:
|
||||
pass
|
||||
func reaction_id(id: int) -> bool:
|
||||
|
||||
return false
|
||||
|
||||
|
||||
func reaction_settle() -> bool:
|
||||
|
||||
return false
|
||||
|
||||
|
||||
func settle_round() -> void:
|
||||
while reaction_settle():
|
||||
pass
|
||||
game_round += 1
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user