From 6629abaf9aa3dcbb4f7e9cdcfebbb685100fed5c Mon Sep 17 00:00:00 2001 From: betalars Date: Sat, 1 Jul 2023 01:41:13 +0200 Subject: [PATCH] supressing editor rotation in card script --- src/logic-scenes/board/card.gd | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/logic-scenes/board/card.gd b/src/logic-scenes/board/card.gd index 46ab6ee..369fbce 100644 --- a/src/logic-scenes/board/card.gd +++ b/src/logic-scenes/board/card.gd @@ -16,10 +16,11 @@ var scale_tween if is_inside_tree() or Engine.is_editor_hint(): $Label.text = value $BackgroundSprite.frame = text.hash() % $BackgroundSprite.sprite_frames.get_frame_count($BackgroundSprite.animation) + if is_inside_tree() and !Engine.is_editor_hint(): wiggle_pos = float(text.hash() % 100) + _handle_wiggle(0) if is_inside_tree() and value == "": $BackgroundSprite.void_active = true - _handle_wiggle(0) @export var wiggle_strength: float = 0.2 @export var wiggle_speed: float = 5 @export_range(1, 2) var scale_bump: float = 1.05 @@ -72,7 +73,8 @@ func _ready(): $Label.text = self.text wiggle_pos = float(text.hash() % 100) - _handle_wiggle(0) + if not Engine.is_editor_hint(): + _handle_wiggle(0) func _process(delta: float) -> void: