]> Untitled Git - lightcycles.git/blobdiff - player/player.gd
Made walls better
[lightcycles.git] / player / player.gd
index 1c842d4b5c14153628d0b0a39e6506a17acc55ac..43786766b45baa9c595e09cc77b33f756b0f1fa6 100644 (file)
@@ -2,7 +2,6 @@ class_name Player
 extends CharacterBody3D
 
 
 extends CharacterBody3D
 
 
-signal playerReady
 signal playerTurn
 
 
 signal playerTurn
 
 
@@ -17,16 +16,15 @@ signal playerTurn
 
 func _ready() -> void:
        _springArm.spring_length = distance
 
 func _ready() -> void:
        _springArm.spring_length = distance
-       playerReady.emit(self)
 
 
 func _input(event: InputEvent) -> void:
        if event.is_action_pressed("player_left"):
 
 
 func _input(event: InputEvent) -> void:
        if event.is_action_pressed("player_left"):
-               playerTurn.emit(self)
                global_rotate(Vector3.UP, PI/2)
                global_rotate(Vector3.UP, PI/2)
-       elif event.is_action_pressed("player_right"):
                playerTurn.emit(self)
                playerTurn.emit(self)
+       elif event.is_action_pressed("player_right"):
                global_rotate(Vector3.UP, -PI/2)
                global_rotate(Vector3.UP, -PI/2)
+               playerTurn.emit(self)
 
 
 func _physics_process(_delta: float) -> void:
 
 
 func _physics_process(_delta: float) -> void: