1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-21 14:57:09 +00:00

C#: Renames to follow .NET naming conventions

Renamed C# types and members to use PascalCase and follow .NET naming conventions.
This commit is contained in:
Raul Santos
2022-12-07 16:11:39 +01:00
parent 4788cb35c1
commit a968e51414
60 changed files with 2885 additions and 2536 deletions

View File

@@ -17,22 +17,22 @@ public partial class _CLASS_ : _BASE_
// Add the gravity.
if (!IsOnFloor())
velocity.y += gravity * (float)delta;
velocity.Y += gravity * (float)delta;
// Handle Jump.
if (Input.IsActionJustPressed("ui_accept") && IsOnFloor())
velocity.y = JumpVelocity;
velocity.Y = JumpVelocity;
// Get the input direction and handle the movement/deceleration.
// As good practice, you should replace UI actions with custom gameplay actions.
Vector2 direction = Input.GetVector("ui_left", "ui_right", "ui_up", "ui_down");
if (direction != Vector2.Zero)
{
velocity.x = direction.x * Speed;
velocity.X = direction.X * Speed;
}
else
{
velocity.x = Mathf.MoveToward(Velocity.x, 0, Speed);
velocity.X = Mathf.MoveToward(Velocity.X, 0, Speed);
}
Velocity = velocity;