20 lines
515 B
C#
20 lines
515 B
C#
using Godot;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Godot.Collections;
|
|
|
|
namespace Rokojori
|
|
{
|
|
[Tool]
|
|
[GlobalClass, Icon("res://addons/rokojori_action_library/Icons/CCJump.svg")]
|
|
public partial class HeightDurationGravityStrength:GravityStrength
|
|
{
|
|
[Export]
|
|
public HeightDuration heightDuration;
|
|
|
|
public override float GetGravityStrength( Gravity gravity )
|
|
{
|
|
return heightDuration.height * 2f / ( heightDuration.duration * heightDuration.duration );
|
|
}
|
|
}
|
|
} |