File tree Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -49,4 +49,5 @@ screenshot_card={
49
49
50
50
[rendering ]
51
51
52
+ renderer/rendering_method ="gl_compatibility"
52
53
environment/defaults/default_environment ="res://default_env.tres"
Original file line number Diff line number Diff line change @@ -1998,15 +1998,14 @@ func _organize_attachments() -> void:
1998
1998
1999
1999
# We don't want to try and move it if it's still tweening.
2000
2000
# But if it isn't, we make sure it always follows its parent is_running()
2001
- if not (card ._tween .is_running ()) and \
2002
- card .state in \
2003
- [CardState .ON_PLAY_BOARD ,CardState .FOCUSED_ON_BOARD ]:
2004
- card .global_position = global_position + \
2005
- Vector2 (
2006
- (attach_index + 1 ) * card_size .x
2007
- * CFConst .ATTACHMENT_OFFSET [attachment_offset ].x ,
2008
- (attach_index + 1 ) * card_size .y \
2009
- * CFConst .ATTACHMENT_OFFSET [attachment_offset ].y )
2001
+ var tween = card ._tween .get_ref () as Tween
2002
+ if (not (tween and tween .is_running ())
2003
+ and card .state in [CardState .ON_PLAY_BOARD ,CardState .FOCUSED_ON_BOARD ]
2004
+ ):
2005
+ card .global_position = (global_position +
2006
+ Vector2 (
2007
+ (attach_index + 1 ) * card_size .x * CFConst .ATTACHMENT_OFFSET [attachment_offset ].x ,
2008
+ (attach_index + 1 ) * card_size .y * CFConst .ATTACHMENT_OFFSET [attachment_offset ].y ))
2010
2009
2011
2010
# Returns the global mouse position but ensures it does not exit the
2012
2011
# viewport limits when including the card rect
Original file line number Diff line number Diff line change @@ -59,8 +59,9 @@ func reshuffle_all_in_pile(pile: Pile = cfc.NMAP.deck):
59
59
await get_tree ().create_timer (0.1 ).timeout
60
60
# Last card in, is the top card of the pile
61
61
var last_card : Card = pile .get_top_card ()
62
- if last_card ._tween and last_card ._tween .is_running ():
63
- await last_card ._tween .finished
62
+ var tween = last_card ._tween .get_ref () as Tween
63
+ if tween .is_running ():
64
+ await tween .finished
64
65
await get_tree ().create_timer (0.2 ).timeout
65
66
pile .shuffle_cards ()
66
67
You can’t perform that action at this time.
0 commit comments