feat: monster card
This commit is contained in:
parent
3220f4937f
commit
46e4ba0fbb
5 changed files with 125 additions and 85 deletions
BIN
assets/card_base/batu.png
(Stored with Git LFS)
BIN
assets/card_base/batu.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/card_base/gunting.png
(Stored with Git LFS)
BIN
assets/card_base/gunting.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/card_base/kertas.png
(Stored with Git LFS)
BIN
assets/card_base/kertas.png
(Stored with Git LFS)
Binary file not shown.
|
|
@ -21,7 +21,7 @@ func show_monster(monster: MatchMonster):
|
||||||
return
|
return
|
||||||
|
|
||||||
name_label.text = monster.card.id
|
name_label.text = monster.card.id
|
||||||
health_label.text = "HP %d" % [monster.health]
|
health_label.text = "HP %d/%d" % [monster.health, monster.card.base_health]
|
||||||
icon_texture_rect.texture = monster.card.icon
|
icon_texture_rect.texture = monster.card.icon
|
||||||
|
|
||||||
paper_damage.text = str(monster.card.paper)
|
paper_damage.text = str(monster.card.paper)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
[gd_scene load_steps=15 format=3 uid="uid://bhrelvt51cbp2"]
|
[gd_scene load_steps=14 format=3 uid="uid://bhrelvt51cbp2"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://cqladcrximh6" path="res://assets/card_base/Screenshot 2025-01-25 211435.png" id="1_nvo50"]
|
|
||||||
[ext_resource type="Script" path="res://ui/card_template/monster_card.gd" id="1_xddej"]
|
[ext_resource type="Script" path="res://ui/card_template/monster_card.gd" id="1_xddej"]
|
||||||
[ext_resource type="Texture2D" uid="uid://l2nxxhh0pvh8" path="res://assets/card_base/Frame.png" id="2_lhxdu"]
|
[ext_resource type="Texture2D" uid="uid://l2nxxhh0pvh8" path="res://assets/card_base/Frame.png" id="2_lhxdu"]
|
||||||
[ext_resource type="Texture2D" uid="uid://crgrple0uik7x" path="res://assets/card_base/Stroke.png" id="4_kkcc6"]
|
[ext_resource type="Texture2D" uid="uid://crgrple0uik7x" path="res://assets/card_base/Stroke.png" id="4_kkcc6"]
|
||||||
|
|
@ -33,15 +32,9 @@ name_label = NodePath("MarginContainer/MonsterNameLabel")
|
||||||
health_label = NodePath("MarginContainer/HealthLabel")
|
health_label = NodePath("MarginContainer/HealthLabel")
|
||||||
energy_pip_container = NodePath("MarginContainer/EnergyStarsContainer")
|
energy_pip_container = NodePath("MarginContainer/EnergyStarsContainer")
|
||||||
icon_texture_rect = NodePath("MarginContainer/TextureRect2/IconTextureRect")
|
icon_texture_rect = NodePath("MarginContainer/TextureRect2/IconTextureRect")
|
||||||
paper_damage = NodePath("MarginContainer/Paper/PaperDamage")
|
paper_damage = NodePath("MarginContainer/HBoxContainer/Rock2/PaperLabel")
|
||||||
scissors_damage = NodePath("MarginContainer/Scissors/ScissorsDamage")
|
scissors_damage = NodePath("MarginContainer/HBoxContainer/Rock3/ScissorsLabel")
|
||||||
rock_damage = NodePath("MarginContainer/Rock/RockDamage")
|
rock_damage = NodePath("MarginContainer/HBoxContainer/Rock/RockLabel")
|
||||||
|
|
||||||
[node name="Screenshot2025-01-25211435" type="Sprite2D" parent="."]
|
|
||||||
visible = false
|
|
||||||
position = Vector2(355, 157)
|
|
||||||
scale = Vector2(0.625, 0.625)
|
|
||||||
texture = ExtResource("1_nvo50")
|
|
||||||
|
|
||||||
[node name="Frame" type="TextureRect" parent="."]
|
[node name="Frame" type="TextureRect" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
|
|
@ -121,12 +114,13 @@ stretch_mode = 5
|
||||||
[node name="EnergyStarsContainer" type="HBoxContainer" parent="MarginContainer"]
|
[node name="EnergyStarsContainer" type="HBoxContainer" parent="MarginContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_left = 141.0
|
offset_left = 100.0
|
||||||
offset_top = 55.0
|
offset_top = 54.0
|
||||||
offset_right = 200.0
|
offset_right = 197.0
|
||||||
offset_bottom = 70.0
|
offset_bottom = 69.0
|
||||||
|
alignment = 2
|
||||||
|
|
||||||
[node name="TextureRect3" type="TextureRect" parent="MarginContainer/EnergyStarsContainer"]
|
[node name="TextureRect" type="TextureRect" parent="MarginContainer/EnergyStarsContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
texture = ExtResource("8_ophhb")
|
texture = ExtResource("8_ophhb")
|
||||||
expand_mode = 3
|
expand_mode = 3
|
||||||
|
|
@ -138,7 +132,19 @@ texture = ExtResource("8_ophhb")
|
||||||
expand_mode = 3
|
expand_mode = 3
|
||||||
stretch_mode = 5
|
stretch_mode = 5
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="MarginContainer/EnergyStarsContainer"]
|
[node name="TextureRect3" type="TextureRect" parent="MarginContainer/EnergyStarsContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
texture = ExtResource("8_ophhb")
|
||||||
|
expand_mode = 3
|
||||||
|
stretch_mode = 5
|
||||||
|
|
||||||
|
[node name="TextureRect4" type="TextureRect" parent="MarginContainer/EnergyStarsContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
texture = ExtResource("8_ophhb")
|
||||||
|
expand_mode = 3
|
||||||
|
stretch_mode = 5
|
||||||
|
|
||||||
|
[node name="TextureRect5" type="TextureRect" parent="MarginContainer/EnergyStarsContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
texture = ExtResource("8_ophhb")
|
texture = ExtResource("8_ophhb")
|
||||||
expand_mode = 3
|
expand_mode = 3
|
||||||
|
|
@ -156,7 +162,7 @@ offset_bottom = 80.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
theme = ExtResource("9_6x2vq")
|
theme = ExtResource("9_6x2vq")
|
||||||
theme_override_font_sizes/font_size = 16
|
theme_override_font_sizes/font_size = 16
|
||||||
text = "HP 80"
|
text = "HP 80/100"
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="MonsterNameLabel" type="Label" parent="MarginContainer"]
|
[node name="MonsterNameLabel" type="Label" parent="MarginContainer"]
|
||||||
|
|
@ -185,6 +191,7 @@ expand_mode = 1
|
||||||
stretch_mode = 5
|
stretch_mode = 5
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="MarginContainer/CardNumber"]
|
[node name="Label" type="Label" parent="MarginContainer/CardNumber"]
|
||||||
|
visible = false
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 8
|
anchors_preset = 8
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
|
|
@ -205,77 +212,110 @@ text = "#01"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="Paper" type="TextureRect" parent="MarginContainer"]
|
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"]
|
||||||
layout_mode = 0
|
|
||||||
offset_left = 109.0
|
|
||||||
offset_top = 183.0
|
|
||||||
offset_right = 222.0
|
|
||||||
offset_bottom = 356.0
|
|
||||||
texture = ExtResource("14_gm7k7")
|
|
||||||
expand_mode = 1
|
|
||||||
stretch_mode = 5
|
|
||||||
|
|
||||||
[node name="PaperDamage" type="Label" parent="MarginContainer/Paper"]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 10
|
anchors_preset = 7
|
||||||
anchor_right = 1.0
|
anchor_left = 0.5
|
||||||
offset_left = 48.0
|
anchor_top = 1.0
|
||||||
offset_top = 32.0
|
anchor_right = 0.5
|
||||||
offset_right = -32.0
|
anchor_bottom = 1.0
|
||||||
offset_bottom = 73.0
|
offset_left = -100.0
|
||||||
|
offset_top = -102.143
|
||||||
|
offset_right = 100.0
|
||||||
|
offset_bottom = -7.1427
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 0
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
|
[node name="Rock" type="Control" parent="MarginContainer/HBoxContainer"]
|
||||||
|
custom_minimum_size = Vector2(64, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="RockLabel" type="Label" parent="MarginContainer/HBoxContainer/Rock"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 5
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
offset_left = -32.0
|
||||||
|
offset_right = 32.0
|
||||||
|
offset_bottom = 26.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
theme = ExtResource("9_6x2vq")
|
theme = ExtResource("9_6x2vq")
|
||||||
theme_override_font_sizes/font_size = 20
|
theme_override_font_sizes/font_size = 24
|
||||||
text = "10"
|
text = "100"
|
||||||
vertical_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 2
|
||||||
|
|
||||||
[node name="Scissors" type="TextureRect" parent="MarginContainer"]
|
[node name="Rock" type="TextureRect" parent="MarginContainer/HBoxContainer/Rock"]
|
||||||
layout_mode = 0
|
layout_mode = 2
|
||||||
offset_left = 43.0
|
|
||||||
offset_top = 182.0
|
|
||||||
offset_right = 156.0
|
|
||||||
offset_bottom = 355.0
|
|
||||||
texture = ExtResource("13_ifoc6")
|
|
||||||
expand_mode = 1
|
|
||||||
stretch_mode = 5
|
|
||||||
|
|
||||||
[node name="ScissorsDamage" type="Label" parent="MarginContainer/Scissors"]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 10
|
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
offset_left = 48.0
|
anchor_bottom = 1.0
|
||||||
offset_top = 32.0
|
offset_top = 30.0
|
||||||
offset_right = -32.0
|
|
||||||
offset_bottom = 73.0
|
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
theme = ExtResource("9_6x2vq")
|
grow_vertical = 2
|
||||||
theme_override_font_sizes/font_size = 20
|
|
||||||
text = "10"
|
|
||||||
vertical_alignment = 1
|
|
||||||
|
|
||||||
[node name="Rock" type="TextureRect" parent="MarginContainer"]
|
|
||||||
layout_mode = 0
|
|
||||||
offset_left = -23.0
|
|
||||||
offset_top = 181.0
|
|
||||||
offset_right = 90.0
|
|
||||||
offset_bottom = 354.0
|
|
||||||
texture = ExtResource("12_a4kkh")
|
texture = ExtResource("12_a4kkh")
|
||||||
expand_mode = 1
|
expand_mode = 1
|
||||||
stretch_mode = 5
|
stretch_mode = 5
|
||||||
|
|
||||||
[node name="RockDamage" type="Label" parent="MarginContainer/Rock"]
|
[node name="Rock2" type="Control" parent="MarginContainer/HBoxContainer"]
|
||||||
unique_name_in_owner = true
|
custom_minimum_size = Vector2(64, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="PaperLabel" type="Label" parent="MarginContainer/HBoxContainer/Rock2"]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 10
|
anchors_preset = 5
|
||||||
anchor_right = 1.0
|
anchor_left = 0.5
|
||||||
offset_left = 48.0
|
anchor_right = 0.5
|
||||||
offset_top = 32.0
|
offset_left = -32.0
|
||||||
offset_right = -32.0
|
offset_right = 32.0
|
||||||
offset_bottom = 73.0
|
offset_bottom = 26.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
theme = ExtResource("9_6x2vq")
|
theme = ExtResource("9_6x2vq")
|
||||||
theme_override_font_sizes/font_size = 20
|
theme_override_font_sizes/font_size = 24
|
||||||
text = "10"
|
text = "10"
|
||||||
vertical_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 2
|
||||||
|
|
||||||
|
[node name="Paper" type="TextureRect" parent="MarginContainer/HBoxContainer/Rock2"]
|
||||||
|
layout_mode = 2
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_top = 30.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
texture = ExtResource("14_gm7k7")
|
||||||
|
expand_mode = 1
|
||||||
|
stretch_mode = 5
|
||||||
|
|
||||||
|
[node name="Rock3" type="Control" parent="MarginContainer/HBoxContainer"]
|
||||||
|
custom_minimum_size = Vector2(64, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="ScissorsLabel" type="Label" parent="MarginContainer/HBoxContainer/Rock3"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 5
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
offset_left = -32.0
|
||||||
|
offset_right = 32.0
|
||||||
|
offset_bottom = 26.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
theme = ExtResource("9_6x2vq")
|
||||||
|
theme_override_font_sizes/font_size = 24
|
||||||
|
text = "10"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 2
|
||||||
|
|
||||||
|
[node name="Scissors" type="TextureRect" parent="MarginContainer/HBoxContainer/Rock3"]
|
||||||
|
layout_mode = 2
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_top = 30.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
texture = ExtResource("13_ifoc6")
|
||||||
|
expand_mode = 1
|
||||||
|
stretch_mode = 5
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue