예제 #1
0
        public bool IsSatisfied(GameState_EliteDangerous gameState)
        {
            if (NeededGameStateCondition != null)
            {
                return(NeededGameStateCondition.IsSatisfied(gameState));
            }

            return(true);
        }
예제 #2
0
        public bool IsSatisfied(GameState_EliteDangerous gameState)
        {
            if (callback != null && !callback(gameState))
            {
                return(false);
            }

            if (guiFocus != null && Array.IndexOf(guiFocus, gameState.Status.GuiFocus) == Flag.UNSPECIFIED)
            {
                return(false);
            }

            if (flagsSet != Flag.UNSPECIFIED && !Flag.IsFlagSet(gameState.Status.Flags, flagsSet))
            {
                return(false);
            }

            if (flagsNotSet != Flag.UNSPECIFIED && Flag.AtLeastOneFlagSet(gameState.Status.Flags, flagsNotSet))
            {
                return(false);
            }

            return(true);
        }