public CellAlchemyState SimulateLiquid(CellAlchemyState cellState, LiquidPhaseState liquid) { CellAlchemyState simulateState = new CellAlchemyState(); simulateState.CopyInformation(cellState); ApplyLiquidInternal(simulateState, liquid); return(simulateState); }
public void CopyInformation(CellAlchemyState copy) { gasState = copy.gasState; liquidState = copy.liquidState; solidState = copy.solidState; blessingState = copy.blessingState; fireState = copy.fireState; shockState = copy.shockState; changedValues.Clear(); foreach (AlchemyChangeType change in copy.changedValues) { changedValues.Add(change); } }
void ApplyLiquidInternal(CellAlchemyState cellState, LiquidPhaseState liquid) { cellState.liquidState = liquid; cellState.changedValues.Add(AlchemyChangeType.Liquid); if ((int)cellState.fireState > (int)FireState.Dry) { ApplyHeatInternal(cellState); if (liquid != LiquidPhaseState.Oil) { ReduceFireState(cellState); } } else if ((int)cellState.fireState < (int)FireState.Dry) { ApplyChillInternal(cellState); } ShockCheck(cellState); }
public void ApplyLiquid(CellAlchemyState cellState, LiquidPhaseState liquid) { ApplyLiquidInternal(cellState, liquid); ApplyVFX(cellState); }