26 lines
856 B
C#
26 lines
856 B
C#
using Godot;
|
|
using System;
|
|
|
|
[GlobalClass, Icon("res://assets/ui/IconGodotNode/white/icon_path_follow.png")]
|
|
public partial class RMovement : Resource
|
|
{
|
|
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
|
public float Speed { get; set;}
|
|
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
|
public float Acceleration { get; set;}
|
|
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
|
public float GravityModifier { get; set;}
|
|
|
|
[Export(PropertyHint.Range, "0,20,1,or_greater")]
|
|
public float TargetHeight { get; set;}
|
|
|
|
public RMovement() : this(1.0f, 0.0f, 0.0f, 0.0f) {}
|
|
public RMovement(float speed, float acceleration, float gravityModifier, float targetHeight)
|
|
{
|
|
Speed = speed;
|
|
Acceleration = acceleration;
|
|
GravityModifier = gravityModifier;
|
|
TargetHeight = targetHeight;
|
|
}
|
|
}
|