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

22 lines
723 B
C#
Raw Normal View History

2022-11-07 01:28:33 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using NeoFPS.CharacterMotion;
using NeoFPS.CharacterMotion.Parameters;
namespace NeoFPS.CharacterMotion.Conditions
{
[MotionGraphElement("Graph/Debug")]
public class DebugCondition : MotionGraphCondition
{
[SerializeField] private bool m_Result = true;
[SerializeField] private string m_Message = "...";
public override bool CheckCondition(MotionGraphConnectable connectable)
{
if (!string.IsNullOrEmpty(m_Message))
Debug.Log(string.Format("Checking condition on connection from {0}: {1}", connectable.name, m_Message));
return m_Result;
}
}
}