public bool IsAvailable(GameContext context) { if (Condition != null) { return(Condition.Call(context)); } return(true); }
public void Call(GameContext context) { var conditionResult = _condition.Call(context); if (conditionResult) { _action.Call(context); } else { _elseAction?.Call(context); } }
public bool Call(GameContext context) { return(!_condition.Call(context)); }