summaryrefslogtreecommitdiff
path: root/godot/scripts/cameras
diff options
context:
space:
mode:
Diffstat (limited to 'godot/scripts/cameras')
-rw-r--r--godot/scripts/cameras/PlayerCamGDS.gd20
1 files changed, 10 insertions, 10 deletions
diff --git a/godot/scripts/cameras/PlayerCamGDS.gd b/godot/scripts/cameras/PlayerCamGDS.gd
index ec46cf8..382ec06 100644
--- a/godot/scripts/cameras/PlayerCamGDS.gd
+++ b/godot/scripts/cameras/PlayerCamGDS.gd
@@ -1,24 +1,24 @@
extends ClippedCamera
-var _modes = ["STATIC", "FIRSTPERSON", "THIRDPERSON", "ARM", "FREECAM"]
-var mode = "STATIC" #STATIC, FIRSTPERSON, THIRDPERSON, ARM, FREECAM
+var _modes: PoolStringArray = ["STATIC", "FIRSTPERSON", "THIRDPERSON", "ARM", "FREECAM"]
+var mode: String = "STATIC" #STATIC, FIRSTPERSON, THIRDPERSON, ARM, FREECAM
#first/third person variables
-var head : Spatial = null
-var neck : Spatial = null
-var player : RigidBody = null
+var head: Spatial = null
+var neck: Spatial = null
+var player: RigidBody = null
#third person/arm variables
-var arm : SpringArm = null
+var arm: SpringArm = null
-var mouse_axis := Vector2()
-var mouse_sensitivity = 12.0
+var mouse_axis: Vector2
+var mouse_sensitivity: float = 12.0
func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
current = true
-func _input(event):
+func _input(event: InputEvent):
if event is InputEventMouseMotion and Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED:
mouse_axis = event.relative
match mode:
@@ -35,7 +35,7 @@ func _input(event):
_:
pass
-func attach(new_parent: Node, c_mode, extra_path = "."):
+func attach(new_parent: Node, c_mode: String, extra_path: String = "."):
if get_parent():
get_parent().remove_child(self)
if c_mode in _modes: