idk anymore

This commit is contained in:
2024-01-24 20:55:45 +01:00
parent e7973d6086
commit 649c83030d
63 changed files with 8112 additions and 194 deletions

View File

@@ -19,6 +19,7 @@ func _ready() -> void:
capture()
camera.make_current()
$Camera3D/DDOF.show() # Würde den spieler im editor unsichtbar machen
WindowManager.pause_menu.continued.connect(capture)
func _physics_process(delta: float) -> void:
gun_cam.transform = camera.transform
@@ -51,16 +52,9 @@ func _input(event: InputEvent) -> void:
if event is InputEventMouseMotion && Input.mouse_mode == Input.MOUSE_MODE_CAPTURED:
rotate_y(-event.relative.x * camera_senitivity * 0.0025)
camera.rotate_x(-event.relative.y * camera_senitivity * 0.0015)
camera.rotation_degrees.x = clamp(camera.rotation_degrees.x, -80, 80)
camera.rotation_degrees.x = clamp(camera.rotation_degrees.x, -50, 80)
if event.is_action_pressed("pause"):
capture(false)
if event.is_action_pressed("mouse_capture"):
capture()
func _notification(what: int) -> void:
if what == NOTIFICATION_APPLICATION_FOCUS_OUT:
capture(false)
func capture(value: bool = true) -> void:
if value: