Make selecting a dice do something to the CardView

This commit is contained in:
2022-07-17 15:53:56 +01:00
parent 929fc6291e
commit 5bd9d2efb3
9 changed files with 122 additions and 44 deletions

View File

@ -13,6 +13,10 @@ func _ready():
$UI/CardView.selected = false
self.player_to_move = false
$UI/CardView.draw_card()
$UI/CardView.draw_card()
$UI/CardView.draw_card()
$UI/DiceView.roll_dice()
$UI/DiceView.roll_dice()
$UI/DiceView.roll_dice()
@ -40,6 +44,7 @@ func _physics_process(delta):
# select the card chooser if dice is selected
if (Input.is_action_just_pressed("ui_accept")
and $UI/DiceView.selected == true):
yield(get_tree().create_timer(0.1), "timeout") #TODO BAD WORKAROUND
$UI/DiceView.selected = false
$UI/CardView.selected = true

View File

@ -33,14 +33,8 @@
1/shape_offset = Vector2( 0, 0 )
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
1/shape_one_way = false
1/shape_one_way_margin = 1.0
1/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": null,
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
1/shape_one_way_margin = 0.0
1/shapes = [ ]
1/z_index = 0
[node name="BattleScene" type="Node2D"]
@ -81,3 +75,5 @@ anchor_top = 0.509722
margin_left = 1.52588e-05
margin_top = -7.62939e-06
grow_horizontal = 0
[connection signal="dice_selected" from="UI/DiceView" to="UI/CardView" method="set_currently_holding_dice"]