Initialization of the player, now reads the Levels initial gravity and direction. Also re-worked the way switches work.

This commit is contained in:
2024-01-23 10:16:50 -08:00
parent d4e97136b3
commit 88968b3871
6 changed files with 77 additions and 45 deletions
+5 -4
View File
@@ -6,7 +6,7 @@ const ANGULAR_ACCELERATION = 7.5;
var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")
var gravity_vector: Vector2
var direction: int = 1
var direction: int
var World: Node2D
var ap: AnimationPlayer
var asp: AudioStreamPlayer
@@ -81,9 +81,10 @@ func _physics_process(delta):
move_and_slide()
func _on_activate_camera():
cam.make_current()
#func _on_activate_camera():
#print("is this being used?")
#cam.make_current()
func _on_fall():
func fall():
asp.stream = fall_sound
asp.play()