using Godot;
using System.Collections;
using System.Collections.Generic;
using Godot.Collections;

namespace Rokojori
{
  [Tool]
  [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/CCGravity.svg")]
  public partial class Gravity:CharacterControllerAction
  {
    [Export]
    public float strength = 10;

    protected override void _OnTrigger()
    {
      if ( body.IsOnFloor() )
      {
        return;
      }
      // RJLog.Log( controller.body.Velocity );
      AddVelocity( Vector3.Down * strength );
    }
  }
}