示例#1
0
        public bool IsAvailable(GameContext context)
        {
            if (Condition != null)
            {
                return(Condition.Call(context));
            }

            return(true);
        }
示例#2
0
        public void Call(GameContext context)
        {
            var conditionResult = _condition.Call(context);

            if (conditionResult)
            {
                _action.Call(context);
            }
            else
            {
                _elseAction?.Call(context);
            }
        }
示例#3
0
 public bool Call(GameContext context)
 {
     return(!_condition.Call(context));
 }