Merge pull request #57748 from fabriceci/rename-script-template-variable
This commit is contained in:
commit
6a56314eab
4 changed files with 8 additions and 8 deletions
|
|
@ -3,7 +3,7 @@
|
|||
extends _BASE_
|
||||
|
||||
const SPEED: float = 300.0
|
||||
const JUMP_FORCE: float = -400.0
|
||||
const JUMP_VELOCITY: float = -400.0
|
||||
|
||||
# Get the gravity from the project settings to be synced with RigidDynamicBody nodes.
|
||||
var gravity: int = ProjectSettings.get_setting("physics/2d/default_gravity")
|
||||
|
|
@ -16,7 +16,7 @@ func _physics_process(delta: float) -> void:
|
|||
|
||||
# Handle Jump.
|
||||
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
|
||||
motion_velocity.y = JUMP_FORCE
|
||||
motion_velocity.y = JUMP_VELOCITY
|
||||
|
||||
# Get the input direction and handle the movement/deceleration.
|
||||
# As good practice, you should replace UI actions with custom gameplay actions.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
extends _BASE_
|
||||
|
||||
const SPEED: float = 5.0
|
||||
const JUMP_FORCE: float = 4.5
|
||||
const JUMP_VELOCITY: float = 4.5
|
||||
|
||||
# Get the gravity from the project settings to be synced with RigidDynamicBody nodes.
|
||||
var gravity: float = ProjectSettings.get_setting("physics/3d/default_gravity")
|
||||
|
|
@ -16,7 +16,7 @@ func _physics_process(delta: float) -> void:
|
|||
|
||||
# Handle Jump.
|
||||
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
|
||||
motion_velocity.y = JUMP_FORCE
|
||||
motion_velocity.y = JUMP_VELOCITY
|
||||
|
||||
# Get the input direction and handle the movement/deceleration.
|
||||
# As good practice, you should replace UI actions with custom gameplay actions.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue