You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
698 B

  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. /// <summary>
  5. /// Logic block which deals with jumping a character in a direction
  6. /// </summary>
  7. [CreateAssetMenu(menuName = "Major Project/Jump Block")]
  8. public class Jump : LogicBlock
  9. {
  10. [SerializeField]
  11. [Tooltip("Direction to Jump")]
  12. protected Direction direction = Direction.Forward;
  13. #region Class Functions
  14. /// <summary>
  15. /// Implementation of BlockLogic, moves the player forward
  16. /// </summary>
  17. /// <param name="player">Player to move</param>
  18. protected override void BlockLogic(Character player)
  19. {
  20. player.Jump(direction);
  21. }
  22. #endregion Class Functions
  23. }