private void OnEfficiencyChanged(GameEvents.EfficiencyChange change) { if (IsLoaded) { OnEfficiencyChanged(change.NewEfficiency - change.OldEfficiency, change.Manager); } }
public void TrackEfficiencyChange(IBosServiceCollection services) { double currEff = Efficiency(services); if (currEff != PrevFrameEfficiency) { var change = new GameEvents.EfficiencyChange { OldEfficiency = PrevFrameEfficiency, NewEfficiency = currEff, Manager = this }; GameEvents.EfficiencyChangeObservanle.OnNext(change); GameEvents.OnEfficiencyChangedEvent(change); } PrevFrameEfficiency = currEff; }