/// <summary> /// Does math with two scores and saves the result in the first score. /// </summary> /// <param name="mainSelector">The first entity (The result will be stored in this entity's score)</param> /// <param name="mainObjective">The first entity's <see cref="Objective"/> (The result will be stored in here)</param> /// <param name="operationType">The operation to do between the numbers</param> /// <param name="otherScore">The other score</param> public void Operation(BaseSelector mainSelector, Objective mainObjective, ID.Operation operationType, ScoreValue otherScore) { Operation(mainSelector, mainObjective, operationType, otherScore, otherScore); }
/// <summary> /// Does math with two scores and saves the result in the first score. /// </summary> /// <param name="score">The first score (The result will be stored in this score)</param> /// <param name="operationType">The operation to do between the numbers</param> /// <param name="otherSelector">The other entity</param> /// <param name="otherObjective">The other entity's <see cref="Objective"/></param> public void Operation(ScoreValue score, ID.Operation operationType, BaseSelector otherSelector, Objective otherObjective) { Operation(score, score, operationType, otherSelector, otherObjective); }
/// <summary> /// Does math with two scores and saves the result in the first score. /// </summary> /// <param name="score">The first score (The result will be stored in this score)</param> /// <param name="operationType">The operation to do between the numbers</param> /// <param name="otherScore">The other score</param> public void Operation(ScoreValue score, ID.Operation operationType, ScoreValue otherScore) { Operation(score, score, operationType, otherScore, otherScore); }
/// <summary> /// Does math with two scores and saves the result in one of the entities' score /// </summary> /// <param name="mainSelector">The first entity (The result will be stored in this entity's score)</param> /// <param name="mainObjective">The first entity's <see cref="Objective"/> (The result will be stored in here)</param> /// <param name="operationType">The operation to do between the numbers</param> /// <param name="otherSelector">The other entity</param> /// <param name="otherObjective">The other entity's <see cref="Objective"/></param> public void Operation(BaseSelector mainSelector, Objective mainObjective, ID.Operation operationType, BaseSelector otherSelector, Objective otherObjective) { mainSelector.LimitSelector(); otherSelector.LimitSelector(); ForFunction.AddCommand(new ScoreboardOperationCommand(mainSelector, mainObjective, operationType, otherSelector, otherObjective)); }
/// <summary> /// Does math with a score and a number and saves the result in the score /// </summary> /// <param name="score">The score to change</param> /// <param name="operationType">The operation to do between the score and number</param> /// <param name="number">The number to do math with</param> public void Operation(ScoreValue score, ID.Operation operationType, int number) { Operation(score, score, operationType, number); }
/// <summary> /// Does math with a score and a number and saves the result in the entity's score /// </summary> /// <param name="mainSelector">The entity score to do math on (Result will be saved in here)</param> /// <param name="mainObjective">The <see cref="Objective"/> to get the value from to do math on</param> /// <param name="operationType">The operation to do between the numbers</param> /// <param name="number">The number to do math with</param> public void Operation(BaseSelector mainSelector, Objective mainObjective, ID.Operation operationType, int number) { mainSelector.LimitSelector(); ForFunction.AddCommand(new ScoreboardOperationCommand(mainSelector, mainObjective, operationType, ForFunction.PackNamespace.Datapack.GetItems <SharpCraftFiles>().AddConstantNumber(number), ForFunction.PackNamespace.Datapack.GetItems <SharpCraftFiles>().ConstantObjective !)); }