Пример #1
0
 /// <summary>
 /// Executes if the <paramref name="mainSelector"/>'s score value is <paramref name="operation"/> than <paramref name="otherSelector"/>'s score value
 /// </summary>
 /// <param name="mainSelector">The first <see cref="BaseSelector"/></param>
 /// <param name="mainObject">The first <see cref="BaseSelector"/>'s <see cref="Objective"/></param>
 /// <param name="operation">The operation used to check the scores</param>
 /// <param name="otherSelector">The second <see cref="BaseSelector"/></param>
 /// <param name="otherObject">The second <see cref="BaseSelector"/>'s <see cref="Objective"/></param>
 /// <param name="want">false if it should execute when it's false</param>
 /// <returns>The function running the command</returns>
 public Function IfScore(BaseSelector mainSelector, Objective mainObject, ID.IfScoreOperation operation, BaseSelector otherSelector, Objective otherObject, bool want = true)
 {
     mainSelector.LimitSelector();
     otherSelector.LimitSelector();
     ForFunction.AddCommand(new ExecuteIfScoreRelative(mainSelector, mainObject, operation, otherSelector, otherObject, want));
     return(ForFunction);
 }
Пример #2
0
 /// <summary>
 /// Intializes a new <see cref="ExecuteIfScoreRelative"/> command
 /// </summary>
 /// <param name="selector1">Selector selecting the thing to get a score from</param>
 /// <param name="objective1">The <see cref="Objective"/> to get the score for <see cref="selector1"/> from</param>
 /// <param name="selector2">Selector selecting the thing to get a score from</param>
 /// <param name="objective2">The <see cref="Objective"/> to get the score for <see cref="selector2"/> from</param>
 /// <param name="operator">How the scores should be relative to each other</param>
 /// <param name="executeIf">True to use execute if and false to use execute unless the given thing is true</param>
 public ExecuteIfScoreRelative(BaseSelector selector1, Objective objective1, ID.IfScoreOperation @operator, BaseSelector selector2, Objective objective2, bool executeIf = true) : base(executeIf)
 {
     Selector1  = selector1;
     Objective1 = objective1;
     Selector2  = selector2;
     Objective2 = objective2;
     Operator   = @operator;
 }
Пример #3
0
 /// <summary>
 /// Executes if the score is <paramref name="operation"/> than the other score
 /// </summary>
 /// <param name="mainSelector">The first <see cref="BaseSelector"/></param>
 /// <param name="mainObject">The first <see cref="BaseSelector"/>'s <see cref="Objective"/></param>
 /// <param name="operation">The operation used to check the scores</param>
 /// <param name="otherScore">The second score</param>
 /// <param name="want">false if it should execute when it's false</param>
 /// <returns>The function running the command</returns>
 public Function IfScore(BaseSelector mainSelector, Objective mainObject, ID.IfScoreOperation operation, ScoreValue otherScore, bool want = true)
 {
     return(IfScore(mainSelector, mainObject, operation, otherScore, otherScore, want));
 }
Пример #4
0
 /// <summary>
 /// Executes if the score is <paramref name="operation"/> than the other score
 /// </summary>
 /// <param name="score">The first score</param>
 /// <param name="operation">The operation used to check the scores</param>
 /// <param name="otherSelector">The second <see cref="BaseSelector"/></param>
 /// <param name="otherObject">The second <see cref="BaseSelector"/>'s <see cref="Objective"/></param>
 /// <param name="want">false if it should execute when it's false</param>
 /// <returns>The function running the command</returns>
 public Function IfScore(ScoreValue score, ID.IfScoreOperation operation, BaseSelector otherSelector, Objective otherObject, bool want = true)
 {
     return(IfScore(score, score, operation, otherSelector, otherObject, want));
 }
Пример #5
0
 /// <summary>
 /// Executes if the score is <paramref name="operation"/> than the other score
 /// </summary>
 /// <param name="score">The first score</param>
 /// <param name="operation">The operation used to check the scores</param>
 /// <param name="otherScore">The second score</param>
 /// <param name="want">false if it should execute when it's false</param>
 /// <returns>The function running the command</returns>
 public Function IfScore(ScoreValue score, ID.IfScoreOperation operation, ScoreValue otherScore, bool want = true)
 {
     return(IfScore(score, score, operation, otherScore, otherScore, want));
 }