chore: clean up sticky-note.gd
This commit is contained in:
parent
94ff8d32ec
commit
598cf19c7c
|
|
@ -95,15 +95,6 @@ func _on_text_updated():
|
||||||
label.text = text
|
label.text = text
|
||||||
background_sprite.frame = text.hash() % background_sprite.sprite_frames.get_frame_count(background_sprite.animation)
|
background_sprite.frame = text.hash() % background_sprite.sprite_frames.get_frame_count(background_sprite.animation)
|
||||||
|
|
||||||
func replace_with(sticky_note: StickyNote):
|
|
||||||
self.text = sticky_note.text
|
|
||||||
self.voice_line = sticky_note.voice_line
|
|
||||||
self.sibling = sticky_note.sibling
|
|
||||||
self.name = sticky_note.name
|
|
||||||
for group in self.get_groups():
|
|
||||||
self.remove_from_group(group)
|
|
||||||
for group in sticky_note.get_groups():
|
|
||||||
self.add_to_group(group)
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
if get_overlapping_areas().size() > 0 and is_dragable and on_board:
|
if get_overlapping_areas().size() > 0 and is_dragable and on_board:
|
||||||
|
|
@ -197,9 +188,3 @@ func tween_transform_to(target: Transform2D):
|
||||||
await transform_tween.finished
|
await transform_tween.finished
|
||||||
transform_tween_finished.emit()
|
transform_tween_finished.emit()
|
||||||
|
|
||||||
func reset_drag():
|
|
||||||
if attached_to != null:
|
|
||||||
attached_to.reclaim_sticky_note()
|
|
||||||
|
|
||||||
func free() -> void:
|
|
||||||
assert(false)
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue