Tweak a few things and add CardView to the battlescene

This commit is contained in:
CactiChameleon9 2022-07-16 19:16:51 +01:00
parent 6a6e74efa8
commit 051cc25a38
3 changed files with 49 additions and 28 deletions

View File

@ -1,8 +1,9 @@
[gd_scene load_steps=5 format=2]
[gd_scene load_steps=6 format=2]
[ext_resource path="res://icon.png" type="Texture" id=1]
[ext_resource path="res://Characters/Player.tscn" type="PackedScene" id=2]
[ext_resource path="res://Scenes/BattleScene.gd" type="Script" id=3]
[ext_resource path="res://UI/CardView.tscn" type="PackedScene" id=4]
[sub_resource type="TileSet" id=1]
0/name = "icon.png 0"
@ -33,3 +34,20 @@ format = 1
tile_data = PoolIntArray( 65540, 0, 0, 131074, 0, 0, 131075, 0, 0, 131076, 0, 0, 131077, 0, 0, 131078, 0, 0, 196610, 0, 0, 196611, 0, 0, 196612, 0, 0, 196613, 0, 0, 196614, 0, 0, 262144, 0, 0, 262145, 0, 0, 262146, 0, 0, 262147, 0, 0, 262148, 0, 0, 262149, 0, 0, 262150, 0, 0, 327681, 0, 0, 327682, 0, 0, 327683, 0, 0, 327684, 0, 0, 327685, 0, 0, 327686, 0, 0, 393217, 0, 0, 393218, 0, 0, 393219, 0, 0, 393220, 0, 0, 393221, 0, 0, 393222, 0, 0, 458754, 0, 0, 458755, 0, 0, 458756, 0, 0, 458757, 0, 0, 524291, 0, 0, 524292, 0, 0 )
[node name="Player" parent="." instance=ExtResource( 2 )]
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="MarginContainer" type="MarginContainer" parent="CanvasLayer"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 30.0
margin_top = 285.0
margin_right = -30.0
margin_bottom = -5.0
[node name="CardView" parent="CanvasLayer/MarginContainer" instance=ExtResource( 4 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 0.0
margin_right = 964.0
margin_bottom = 310.0

View File

@ -1,7 +1,7 @@
[gd_scene load_steps=12 format=2]
[ext_resource path="res://UI/Card.gd" type="Script" id=1]
[ext_resource path="res://Assets/CardDB/Broadsword.tres" type="Resource" id=2]
[ext_resource path="res://Assets/CardDB/Default.tres" type="Resource" id=2]
[ext_resource path="res://Assets/Metropolis-font/Metropolis-Bold.ttf" type="DynamicFontData" id=3]
[ext_resource path="res://Assets/DiceInput.png" type="Texture" id=4]
[ext_resource path="res://AutoGridContainer - Full Version/AutoGridContainer.tscn" type="PackedScene" id=5]
@ -35,8 +35,6 @@ font_data = ExtResource( 3 )
[node name="Card" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_right = -741.0
margin_bottom = -227.0
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource( 1 )
@ -56,23 +54,24 @@ margin_right = -10.0
margin_bottom = -10.0
[node name="Name" type="Label" parent="VBox"]
margin_right = 263.0
margin_right = 1004.0
margin_bottom = 31.0
custom_fonts/font = SubResource( 2 )
text = "Broadsword"
text = "Default"
align = 1
autowrap = true
[node name="AutoGrid" parent="VBox" instance=ExtResource( 5 )]
margin_top = 35.0
margin_right = 263.0
margin_bottom = 256.0
margin_right = 1004.0
margin_bottom = 486.0
[node name="InputDice0" type="TextureRect" parent="VBox/AutoGrid"]
margin_left = 9.0
margin_right = 209.0
margin_bottom = 200.0
rect_min_size = Vector2( 100, 100 )
margin_left = 42.0
margin_top = 5.0
margin_right = 192.0
margin_bottom = 155.0
rect_min_size = Vector2( 75, 75 )
size_flags_horizontal = 3
size_flags_vertical = 3
texture = ExtResource( 4 )
@ -90,13 +89,12 @@ align = 1
valign = 1
[node name="Description" type="Label" parent="VBox"]
margin_top = 260.0
margin_right = 263.0
margin_bottom = 353.0
margin_top = 490.0
margin_right = 1004.0
margin_bottom = 580.0
rect_min_size = Vector2( 0, 90 )
custom_fonts/font = SubResource( 5 )
text = "Does damage equal to the sum of both dice to all enemies
Range: 2 spaces"
text = "Default Description"
align = 1
valign = 1
autowrap = true

View File

@ -1,12 +1,14 @@
[gd_scene load_steps=2 format=2]
[gd_scene load_steps=5 format=2]
[ext_resource path="res://UI/Card.tscn" type="PackedScene" id=1]
[ext_resource path="res://Assets/CardDB/Sprint.tres" type="Resource" id=2]
[ext_resource path="res://Assets/CardDB/Poisonous apple.tres" type="Resource" id=3]
[ext_resource path="res://Assets/CardDB/Broadsword.tres" type="Resource" id=4]
[node name="CardView" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = 277.0
margin_right = -252.0
margin_top = 249.0
[node name="HBox" type="HBoxContainer" parent="."]
anchor_right = 1.0
@ -16,19 +18,22 @@ custom_constants/separation = 50
[node name="Card1" parent="HBox" instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 224.0
margin_bottom = 323.0
margin_right = 308.0
margin_bottom = 351.0
card_info = ExtResource( 2 )
[node name="Card2" parent="HBox" instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 274.0
margin_right = 498.0
margin_bottom = 323.0
margin_left = 358.0
margin_right = 666.0
margin_bottom = 351.0
card_info = ExtResource( 4 )
[node name="Card3" parent="HBox" instance=ExtResource( 1 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 548.0
margin_right = 772.0
margin_bottom = 323.0
margin_left = 716.0
margin_right = 1024.0
margin_bottom = 351.0
card_info = ExtResource( 3 )