public bool GetStatChange(FxState state, FxOp op) { if (state == FxState.Shield) { return(Evaluate(shield, op, oldShield)); } if (state == FxState.Armor) { return(Evaluate(armor, op, oldArmor)); } if (state == FxState.Health) { return(Evaluate(health, op, oldHealth)); } if (state == FxState.Energy) { return(Evaluate(energy, op, oldEnergy)); } if (state == FxState.Stage) { return(Evaluate(stage, op, oldStage)); } if (state == FxState.Monitor) { return(Evaluate(monitor, op, oldMonitor)); } return(false); }
public bool Evaluate(float a, FxOp op, float b) { if (op == FxOp.Equals) { return(a == b); } if (op == FxOp.LessThan) { return(a < b); } if (op == FxOp.MoreThan) { return(a > b); } if (op == FxOp.LessEqual) { return(a <= b); } if (op == FxOp.MoreEqual) { return(a >= b); } if (op == FxOp.Increases) { return(a > b); } if (op == FxOp.Decreases) { return(a < b); } if (op == FxOp.Changes) { return(a != b); } return(false); }