summaryrefslogtreecommitdiff
path: root/modules/mono/editor_templates
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-02-07 13:22:23 +0100
committerGitHub <noreply@github.com>2022-02-07 13:22:23 +0100
commit6a56314eaba261b73cb297ebd8754a9746de2e45 (patch)
treeba3e4cfd6b49a61c9d363db1fdaf0910f76d78ca /modules/mono/editor_templates
parent6a33d8b93fc7175865a9c064c6ba4bf400c9650d (diff)
parente81ccaf270fa06a7ecc6cbf9aed2a35dee29984c (diff)
Merge pull request #57748 from fabriceci/rename-script-template-variable
Diffstat (limited to 'modules/mono/editor_templates')
-rw-r--r--modules/mono/editor_templates/CharacterBody2D/basic_movement.cs4
-rw-r--r--modules/mono/editor_templates/CharacterBody3D/basic_movement.cs4
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/mono/editor_templates/CharacterBody2D/basic_movement.cs b/modules/mono/editor_templates/CharacterBody2D/basic_movement.cs
index 6e9547ce9b..b0ded3133f 100644
--- a/modules/mono/editor_templates/CharacterBody2D/basic_movement.cs
+++ b/modules/mono/editor_templates/CharacterBody2D/basic_movement.cs
@@ -6,7 +6,7 @@ using System;
public partial class _CLASS_ : _BASE_
{
public const float Speed = 300.0f;
- public const float JumpForce = -400.0f;
+ public const float JumpVelocity = -400.0f;
// Get the gravity from the project settings to be synced with RigidDynamicBody nodes.
public float gravity = (float)ProjectSettings.GetSetting("physics/2d/default_gravity");
@@ -21,7 +21,7 @@ public partial class _CLASS_ : _BASE_
// Handle Jump.
if (Input.IsActionJustPressed("ui_accept") && IsOnFloor())
- motionVelocity.y = JumpForce;
+ motionVelocity.y = JumpVelocity;
// Get the input direction and handle the movement/deceleration.
// As good practice, you should replace UI actions with custom gameplay actions.
diff --git a/modules/mono/editor_templates/CharacterBody3D/basic_movement.cs b/modules/mono/editor_templates/CharacterBody3D/basic_movement.cs
index 13be4bbcb1..d8c2f67ac8 100644
--- a/modules/mono/editor_templates/CharacterBody3D/basic_movement.cs
+++ b/modules/mono/editor_templates/CharacterBody3D/basic_movement.cs
@@ -6,7 +6,7 @@ using System;
public partial class _CLASS_ : _BASE_
{
public const float Speed = 5.0f;
- public const float JumpForce = 4.5f;
+ public const float JumpVelocity = 4.5f;
// Get the gravity from the project settings to be synced with RigidDynamicBody nodes.
public float gravity = (float)ProjectSettings.GetSetting("physics/3d/default_gravity");
@@ -21,7 +21,7 @@ public partial class _CLASS_ : _BASE_
// Handle Jump.
if (Input.IsActionJustPressed("ui_accept") && IsOnFloor())
- motionVelocity.y = JumpForce;
+ motionVelocity.y = JumpVelocity;
// Get the input direction and handle the movement/deceleration.
// As good practice, you should replace UI actions with custom gameplay actions.