projectEli/Assets/NeoFPS/Core/MotionGraphs/Conditions/GroundContactCondition.cs

17 lines
497 B
C#
Raw Normal View History

2022-11-07 01:28:33 +00:00
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;
}
}
}