C#: Add dedicated Variant struct, replacing System.Object

This commit is contained in:
Ignacio Roldán Etcheverry 2022-07-28 17:41:49 +02:00
parent a9892f2571
commit 344f5028d4
25 changed files with 776 additions and 124 deletions

View file

@ -9,7 +9,7 @@ public partial class _CLASS_ : _BASE_
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");
public float gravity = ProjectSettings.GetSetting("physics/2d/default_gravity").AsSingle();
public override void _PhysicsProcess(float delta)
{

View file

@ -9,7 +9,7 @@ public partial class _CLASS_ : _BASE_
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");
public float gravity = ProjectSettings.GetSetting("physics/3d/default_gravity").AsSingle();
public override void _PhysicsProcess(float delta)
{