Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using UnityEngine.Events;
- namespace GameCore
- {
- public class ConditionComponent : MonoBehaviour
- {
- [SerializeField] ACondition condition;
- [SerializeField] UnityEvent onTrue;
- [SerializeField] UnityEvent onFalse;
- public void DoCondition ()
- {
- if (condition.Value)
- {
- onTrue.Invoke ();
- }
- else
- {
- onFalse.Invoke ();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment