Add player movement
This commit is contained in:
parent
269b962fef
commit
3f97e18615
27 changed files with 631 additions and 1 deletions
22
scripts/GravityReceiver.cs
Normal file
22
scripts/GravityReceiver.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using Godot;
|
||||
|
||||
public partial class GravityReceiver : Node3D
|
||||
{
|
||||
public bool InGravityZone = false;
|
||||
public float GravityStrength = 0f;
|
||||
public Vector3 GravityDirection = Vector3.Down;
|
||||
|
||||
public void EnterGravityZone(float gravityStrength, Vector3 gravityDirection)
|
||||
{
|
||||
InGravityZone = true;
|
||||
GravityStrength = gravityStrength;
|
||||
GravityDirection = gravityDirection;
|
||||
}
|
||||
|
||||
public void ExitGravityZone()
|
||||
{
|
||||
InGravityZone = false;
|
||||
GravityStrength = 0f;
|
||||
GravityDirection = Vector3.Down;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue