projectEli/Assets/NeoFPS/Core/MotionGraphs/Conditions/GroundContactCondition.cs
2022-11-06 20:28:33 -05:00

17 lines
497 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace NeoFPS.CharacterMotion.Conditions
{
[MotionGraphElement("Character/Ground Contact")]
public class GroundContactCondition : MotionGraphCondition
{
[SerializeField] private bool m_Comparison = false;
public override bool CheckCondition(MotionGraphConnectable connectable)
{
return controller.characterController.isGrounded == m_Comparison;
}
}
}