using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// Logic block which deals with jumping a character in a direction
/// </summary>
[CreateAssetMenu(menuName = "Major Project/Jump Block")]
public class Jump : LogicBlock
{

    [SerializeField]
    [Tooltip("Direction to Jump")]
    protected Direction direction = Direction.Forward;

    #region Class Functions

    /// <summary>
    /// Implementation of BlockLogic, moves the player forward
    /// </summary>
    /// <param name="player">Player to move</param>
    protected override void BlockLogic(Character player, float animationTime)
    {
        player.Jump(direction, animationTime);
    }

    #endregion Class Functions
}