mirror of
https://github.com/Steffo99/pineapple-surf.git
synced 2024-11-25 01:04:18 +00:00
Cleanup player class
This commit is contained in:
parent
dc0bfdd91a
commit
11ff8386de
1 changed files with 1 additions and 26 deletions
|
@ -86,21 +86,6 @@ func _physics_process(delta):
|
|||
else:
|
||||
_air_accelerate(direction, based.length(), AIR_ACCELERATE, delta)
|
||||
|
||||
|
||||
# Apply camera effects
|
||||
var camera_yaw := 0
|
||||
var current_speed := _get_2d_velocity().length()
|
||||
# if is_on_floor() and current_speed > 0:
|
||||
# camera_yaw = -clamp(_get_2d_velocity().length() * input_dir.x, -25, 25)
|
||||
# else:
|
||||
# camera_yaw = 0
|
||||
|
||||
# camera.rotation.z = move_toward(
|
||||
# 0,
|
||||
# camera_yaw,
|
||||
# delta
|
||||
# ) * 2.5
|
||||
|
||||
if active_weapon and active_weapon.ammoType != BaseWeapon.AmmoType.NONE:
|
||||
ammo_label.show()
|
||||
if active_weapon is PeaShooter:
|
||||
|
@ -133,20 +118,10 @@ func _air_accelerate(wish_dir: Vector3, wish_speed: float, airaccelerate: float,
|
|||
velocity += accelspeed * wish_dir
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
func _process(_delta: float) -> void:
|
||||
self.camera.global_transform = self.head.global_transform
|
||||
|
||||
|
||||
func wall_running() -> bool:
|
||||
if is_on_wall_only():
|
||||
if Input.is_action_pressed("jump"):
|
||||
var wall_normal := get_wall_normal()
|
||||
var bas = transform.basis * velocity
|
||||
velocity.y /= 2
|
||||
return true
|
||||
return false
|
||||
|
||||
|
||||
func _input(event):
|
||||
if event is InputEventKey and event.keycode == KEY_ESCAPE:
|
||||
get_tree().quit()
|
||||
|
|
Loading…
Reference in a new issue