supressing editor rotation in card script
This commit is contained in:
parent
82501b1283
commit
6629abaf9a
|
|
@ -16,10 +16,11 @@ var scale_tween
|
||||||
if is_inside_tree() or Engine.is_editor_hint():
|
if is_inside_tree() or Engine.is_editor_hint():
|
||||||
$Label.text = value
|
$Label.text = value
|
||||||
$BackgroundSprite.frame = text.hash() % $BackgroundSprite.sprite_frames.get_frame_count($BackgroundSprite.animation)
|
$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)
|
wiggle_pos = float(text.hash() % 100)
|
||||||
|
_handle_wiggle(0)
|
||||||
if is_inside_tree() and value == "":
|
if is_inside_tree() and value == "":
|
||||||
$BackgroundSprite.void_active = true
|
$BackgroundSprite.void_active = true
|
||||||
_handle_wiggle(0)
|
|
||||||
@export var wiggle_strength: float = 0.2
|
@export var wiggle_strength: float = 0.2
|
||||||
@export var wiggle_speed: float = 5
|
@export var wiggle_speed: float = 5
|
||||||
@export_range(1, 2) var scale_bump: float = 1.05
|
@export_range(1, 2) var scale_bump: float = 1.05
|
||||||
|
|
@ -72,6 +73,7 @@ func _ready():
|
||||||
$Label.text = self.text
|
$Label.text = self.text
|
||||||
|
|
||||||
wiggle_pos = float(text.hash() % 100)
|
wiggle_pos = float(text.hash() % 100)
|
||||||
|
if not Engine.is_editor_hint():
|
||||||
_handle_wiggle(0)
|
_handle_wiggle(0)
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue