コード例 #1
0
 private void OnEfficiencyChanged(GameEvents.EfficiencyChange change)
 {
     if (IsLoaded)
     {
         OnEfficiencyChanged(change.NewEfficiency - change.OldEfficiency, change.Manager);
     }
 }
コード例 #2
0
ファイル: ManagerInfo.cs プロジェクト: OlegGelezcov/boscs
        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;
        }