20 lines
471 B
C#
20 lines
471 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 HeightDurationJumpStrength:JumpStrength
|
||
|
|
{
|
||
|
|
[Export]
|
||
|
|
public HeightDuration heightDuration;
|
||
|
|
|
||
|
|
public override float GetJumpStrength( Jump jump )
|
||
|
|
{
|
||
|
|
return heightDuration.height * 2f / heightDuration.duration;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|