added wall running and jumping
This commit is contained in:
@@ -51,7 +51,7 @@ func _input(event):
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
Engine.time_scale = .01
|
||||
Engine.time_scale = .02
|
||||
player.gamespeed_controlled = true
|
||||
player.controlled_elsewhere = true
|
||||
player_cam_FOV = player.camera.fov
|
||||
@@ -78,7 +78,7 @@ func _physics_process(delta):
|
||||
if Input.is_action_pressed("sprint"):
|
||||
Engine.time_scale = .05
|
||||
else:
|
||||
Engine.time_scale = .01
|
||||
Engine.time_scale = .02
|
||||
|
||||
focus_on_target()
|
||||
|
||||
@@ -117,6 +117,7 @@ func focus_on_target():
|
||||
camera.attributes.dof_blur_far_enabled = true
|
||||
camera.attributes.dof_blur_far_distance = camera.global_position.distance_to(cam_ray.get_collision_point()) + 5.0
|
||||
camera.attributes.dof_blur_near_enabled = true
|
||||
camera.attributes.dof_blur_near_distance = camera.global_position.distance_to(cam_ray.get_collision_point()) - 10.0
|
||||
camera.attributes.dof_blur_amount = lerp(0.0,BLUR_AMOUNT,1.0 - Engine.time_scale)
|
||||
|
||||
func log_path(delta):
|
||||
@@ -130,17 +131,17 @@ func log_path(delta):
|
||||
record_id += 1
|
||||
|
||||
func despawn():
|
||||
var read_record = record_id - 1
|
||||
for i in bullet_path:
|
||||
if read_record > 1:
|
||||
camera.global_position = lerp(bullet_path[read_record]["global_position"],bullet_path[read_record-1]["global_position"],bullet_path[read_record]["delta"])
|
||||
await get_tree().create_timer(bullet_path[read_record]["delta"]).timeout
|
||||
read_record -= 1
|
||||
if read_record <= 0:
|
||||
player.camera.current = true
|
||||
player.controlled_elsewhere = false
|
||||
player.gamespeed_controlled = false
|
||||
##visible = false
|
||||
##collision_shape.disabled = true
|
||||
##await get_tree().create_timer(1).timeout
|
||||
queue_free()
|
||||
#var read_record = record_id - 1
|
||||
#for i in bullet_path:
|
||||
#if read_record > 1:
|
||||
#camera.global_position = lerp(bullet_path[read_record]["global_position"],bullet_path[read_record-1]["global_position"],bullet_path[read_record]["delta"])
|
||||
#await get_tree().create_timer(bullet_path[read_record]["delta"]).timeout
|
||||
#read_record -= 1
|
||||
#if read_record <= 0:
|
||||
player.camera.current = true
|
||||
player.controlled_elsewhere = false
|
||||
player.gamespeed_controlled = false
|
||||
##visible = false
|
||||
##collision_shape.disabled = true
|
||||
##await get_tree().create_timer(1).timeout
|
||||
queue_free()
|
||||
|
||||
Reference in New Issue
Block a user