C#: Assume 64-bit types when type has no meta
When the C# bindings generator finds a type without meta assume the type refers to the 64-bit version of the type: - `float` is converted to `double` - `int` is converted to `long`
This commit is contained in:
@@ -11,17 +11,17 @@ public partial class _CLASS_ : _BASE_
|
||||
// Get the gravity from the project settings to be synced with RigidBody nodes.
|
||||
public float gravity = ProjectSettings.GetSetting("physics/3d/default_gravity").AsSingle();
|
||||
|
||||
public override void _PhysicsProcess(float delta)
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
Vector3 velocity = Velocity;
|
||||
|
||||
// Add the gravity.
|
||||
if (!IsOnFloor())
|
||||
velocity.y -= gravity * 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.
|
||||
|
||||
Reference in New Issue
Block a user