mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-24 16:30:53 +00:00
fixed monty mole sign = 0
This commit is contained in:
4
Scripts/Classes/Entities/Enemies/MontyMole.gd
Executable file → Normal file
4
Scripts/Classes/Entities/Enemies/MontyMole.gd
Executable file → Normal file
@@ -7,7 +7,9 @@ const ACCEL := 1.0
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
target_player = get_tree().get_first_node_in_group("Players")
|
||||
direction = sign(target_player.global_position.x - global_position.x)
|
||||
var dir = sign(target_player.global_position.x - global_position.x)
|
||||
if dir != 0:
|
||||
direction = dir
|
||||
$Sprite.scale.x = direction
|
||||
handle_movement(delta)
|
||||
|
||||
|
||||
@@ -314,8 +314,10 @@ func tally_time() -> void:
|
||||
score_tally_finished.emit()
|
||||
|
||||
func cancel_score_tally() -> void:
|
||||
score_tween.kill()
|
||||
time_tween.kill()
|
||||
if score_tween != null:
|
||||
score_tween.kill()
|
||||
if time_tween != null:
|
||||
time_tween.kill()
|
||||
tallying_score = false
|
||||
$ScoreTally.stop()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user