Merge pull request #275 from Excello-Recherche-Education/claude-delete-unused-code
Remove unused variables and dead code
This commit is contained in:
@@ -18,7 +18,6 @@ var crab_visible: bool = false:
|
||||
set(value):
|
||||
crab_visible = value
|
||||
_set_crab_button_active(stimulus_heard and crab_visible)
|
||||
var is_stimulus: bool = false
|
||||
|
||||
@onready var hole_back: Sprite2D = $HoleBack
|
||||
@onready var hole_front: Sprite2D = $HoleFront
|
||||
@@ -60,10 +59,7 @@ func _process(_delta: float) -> void:
|
||||
crab_audio_stream_player.stop_playing()
|
||||
|
||||
|
||||
func spawn_crab(gp: Dictionary, p_is_stimulus: bool) -> void:
|
||||
|
||||
self.is_stimulus = p_is_stimulus
|
||||
|
||||
func spawn_crab(gp: Dictionary, is_stimulus: bool) -> void:
|
||||
# Instantiate a new crab
|
||||
crab = CRAB_SCENE.instantiate()
|
||||
mask.add_child(crab)
|
||||
@@ -108,7 +104,7 @@ func spawn_crab(gp: Dictionary, p_is_stimulus: bool) -> void:
|
||||
crab = null
|
||||
|
||||
# Emit the despawned signal
|
||||
crab_despawned.emit(p_is_stimulus)
|
||||
crab_despawned.emit(is_stimulus)
|
||||
|
||||
|
||||
func is_button_pressed_with_limit(future: Signal) -> bool:
|
||||
|
||||
@@ -8,19 +8,13 @@ extends Label
|
||||
@export var font_size_width_percent: float = 0.9
|
||||
|
||||
var _current_font_size: int
|
||||
var _default_font_size: int
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
resized.connect(_on_resized)
|
||||
_initialize_default_font_size()
|
||||
_update_font_size()
|
||||
|
||||
|
||||
func _initialize_default_font_size() -> void:
|
||||
_default_font_size = get_theme_font_size("font_size")
|
||||
|
||||
|
||||
func _on_resized() -> void:
|
||||
_update_font_size()
|
||||
|
||||
|
||||
@@ -2,16 +2,12 @@
|
||||
class_name HighlightFX
|
||||
extends Control
|
||||
|
||||
var is_playing: bool = false
|
||||
|
||||
@onready var animation_player: AnimationPlayer = $AnimationPlayer
|
||||
|
||||
|
||||
func play() -> void:
|
||||
is_playing = true
|
||||
animation_player.play("highlight")
|
||||
|
||||
|
||||
func stop() -> void:
|
||||
is_playing = false
|
||||
animation_player.play("stop")
|
||||
|
||||
@@ -3,19 +3,15 @@ extends Control
|
||||
|
||||
signal finished()
|
||||
|
||||
var is_playing: bool = false
|
||||
|
||||
@onready var animation_player: AnimationPlayer = $AnimationPlayer
|
||||
@onready var audio_player: AudioStreamPlayer2D = $AudioStreamPlayer2D
|
||||
|
||||
|
||||
func play() -> void:
|
||||
is_playing = true
|
||||
animation_player.play("right")
|
||||
audio_player.play()
|
||||
|
||||
|
||||
func _on_animation_player_animation_finished(animation_name: StringName) -> void:
|
||||
if animation_name == "right":
|
||||
is_playing = false
|
||||
finished.emit()
|
||||
|
||||
@@ -3,19 +3,15 @@ extends Control
|
||||
|
||||
signal finished()
|
||||
|
||||
var is_playing: bool = false
|
||||
|
||||
@onready var animation_player: AnimationPlayer = $AnimationPlayer
|
||||
@onready var audio_player: AudioStreamPlayer2D = $AudioStreamPlayer2D
|
||||
|
||||
|
||||
func play() -> void:
|
||||
is_playing = true
|
||||
animation_player.play("wrong")
|
||||
audio_player.play()
|
||||
|
||||
|
||||
func _on_animation_player_animation_finished(animation_name: StringName) -> void:
|
||||
if animation_name == "wrong":
|
||||
is_playing = false
|
||||
finished.emit()
|
||||
|
||||
Reference in New Issue
Block a user