示例#1
0
文件: StatBin.cs 项目: yakoder/NRaas
 public void IncStat(string stat, Common.DebugLevel minLevel)
 {
     if (DebuggingLevel >= minLevel)
     {
         IncStat(stat);
     }
 }
示例#2
0
        public int AddScoring(string stat, int score, Common.DebugLevel minLevel)
        {
            if (!Common.kDebugging)
            {
                return(score);
            }

            if (!string.IsNullOrEmpty(stat))
            {
                stat = ": " + stat;
            }

            if ((Scenarios != null) && (Scenarios.TrackingID == ID))
            {
                Scenarios.Trace = true;
                try
                {
                    Scenarios.AddScoring(GetIDName() + stat, score, minLevel);
                }
                finally
                {
                    Scenarios.Trace = false;
                }
            }

            return(Manager.AddScoring(UnlocalizedName + stat, score, minLevel));
        }
示例#3
0
 public void SetDebuggingLevel(Common.DebugLevel value)
 {
     if (mDebugLevel != null)
     {
         mDebugLevel.SetValue(value);
     }
 }
示例#4
0
        public void IncStat(string stat, Common.DebugLevel minLevel)
        {
            if (!Common.kDebugging)
            {
                return;
            }

            if ((Scenarios != null) && (Scenarios.TrackingID == ID))
            {
                Scenarios.Trace = true;
                try
                {
                    Scenarios.IncStat(GetIDName() + ": " + stat, minLevel);
                }
                finally
                {
                    Scenarios.Trace = false;
                }
            }

            if (Manager != null)
            {
                Manager.IncStat(UnlocalizedName + ": " + stat, minLevel);
            }
        }
示例#5
0
        public override float AddStat(string stat, float val, Common.DebugLevel minLevel)
        {
            if (!Common.kDebugging)
            {
                return(val);
            }

            if ((DebuggingEnabled) && (mTotalStats != null))
            {
                mTotalStats.AddStat(stat, val);
            }

            if ((minLevel == Common.DebugLevel.High) && (mStats != null) && (DebuggingLevel >= minLevel))
            {
                SimpleMessageDialog.Show(UnlocalizedName, stat);
                minLevel = Common.DebugLevel.Low;
            }

            if ((mStats != null) && (DebuggingLevel >= minLevel))
            {
                mStats.AddStat(stat, val);
            }

            return(val);
        }
示例#6
0
文件: StatBin.cs 项目: yakoder/NRaas
 public int AddScoring(string stat, int score, Common.DebugLevel minLevel)
 {
     if (DebuggingLevel >= minLevel)
     {
         AddScoring(stat, (float)score);
     }
     return(score);
 }
示例#7
0
            protected override bool Allow(Common.DebugLevel value)
            {
                if (value == Common.DebugLevel.Logging)
                {
                    return(false);
                }

                return(base.Allow(value));
            }
示例#8
0
        public int AddStat(string stat, int val, Common.DebugLevel minLevel)
        {
            if (!Common.kDebugging)
            {
                return(val);
            }

            return((int)AddStat(stat, (float)val, minLevel));
        }
示例#9
0
        public static float AddStat(string stat, float val, Common.DebugLevel minLevel)
        {
            if (sStats == null)
            {
                return(val);
            }

            return(sStats.AddStat(stat, val, minLevel));
        }
示例#10
0
        public override void IncStat(string stat, Common.DebugLevel minLevel)
        {
            if (mTrack)
            {
                Track(stat);
            }

            base.IncStat(stat, minLevel);
        }
示例#11
0
        public override float AddStat(string stat, float val, Common.DebugLevel minLevel)
        {
            if (mTrack)
            {
                Track(stat + " (" + val + ")");
            }

            return(base.AddStat(stat, val, minLevel));
        }
示例#12
0
        public static void IncStat(string stat, Common.DebugLevel minLevel)
        {
            if (sStats == null)
            {
                return;
            }

            sStats.IncStat(stat, minLevel);
        }
示例#13
0
            public int AddScoring(string stat, int score, Common.DebugLevel minLevel)
            {
                if (!Common.kDebugging)
                {
                    return(score);
                }

                return(mStats.AddScoring(mName + " " + stat, score, minLevel));
            }
示例#14
0
文件: StatBin.cs 项目: yakoder/NRaas
        public int AddStat(string stat, int val, Common.DebugLevel minLevel)
        {
            if (DebuggingLevel >= minLevel)
            {
                AddStat(stat, val);
            }

            return(val);
        }
示例#15
0
            public void IncStat(string stat, Common.DebugLevel minLevel)
            {
                if (!Common.kDebugging)
                {
                    return;
                }

                mStats.IncStat(mName + " " + stat, minLevel);
            }
示例#16
0
            public float AddStat(string stat, float val, Common.DebugLevel minLevel)
            {
                if (!Common.kDebugging)
                {
                    return(val);
                }

                return(mStats.AddStat(mName + " " + stat, val, minLevel));
            }
示例#17
0
            public int AddScoring(string scoring, SimDescription sim, Common.DebugLevel minLevel)
            {
                int score = ScoringLookup.GetScore(scoring, sim);

                if (!Common.kDebugging)
                {
                    return(score);
                }

                return(AddScoring(mName + " " + scoring, score, minLevel));
            }
示例#18
0
        public float AddStat(string stat, float val, Common.DebugLevel minLevel)
        {
            if (!Common.kDebugging)
            {
                return(val);
            }

            if ((Scenarios != null) && (Scenarios.TrackingID == ID))
            {
                Scenarios.Trace = true;
                try
                {
                    Scenarios.AddStat(GetIDName() + ": " + stat, val, minLevel);
                }
                finally
                {
                    Scenarios.Trace = false;
                }
            }

            return(Manager.AddStat(UnlocalizedName + ": " + stat, val, minLevel));
        }
示例#19
0
        public int AddScoring(string stat, int score, Common.DebugLevel minLevel)
        {
            if (!Common.kDebugging)
            {
                return(score);
            }

            if (score > 0)
            {
                AddStat(stat + " Scoring Pos", score, minLevel);
            }
            else if (score < 0)
            {
                AddStat(stat + " Scoring Neg", score, minLevel);
            }
            else
            {
                AddStat(stat + " Scoring Zero", score, minLevel);
            }

            return(score);
        }
示例#20
0
        public override void IncStat(string stat, Common.DebugLevel minLevel)
        {
            if (!Common.kDebugging)
            {
                return;
            }

            if ((DebuggingEnabled) && (mTotalStats != null))
            {
                mTotalStats.IncStat(stat);
            }

            if ((minLevel == Common.DebugLevel.High) && (mStats != null) && (DebuggingLevel >= minLevel))
            {
                Common.Notify(stat);

                minLevel = Common.DebugLevel.Low;
            }

            if ((mStats != null) && (DebuggingLevel >= minLevel))
            {
                mStats.IncStat(stat);
            }
        }
示例#21
0
 public int AddScoring(string scoring, SimDescription sim, Common.DebugLevel minLevel)
 {
     return(AddScoring(scoring, ScoringLookup.GetScore(scoring, sim)));
 }
示例#22
0
 public void IncStat(string stat, Common.DebugLevel minLevel)
 {
     sStats.IncStat(stat);
 }
示例#23
0
 public float AddStat(string stat, float val, Common.DebugLevel minLevel)
 {
     return(sStats.AddStat(stat, val));
 }
示例#24
0
 public int AddStat(string stat, int val, Common.DebugLevel minLevel)
 {
     return((int)sStats.AddStat(stat, val));
 }
示例#25
0
 public int AddScoring(string stat, int score, Common.DebugLevel minLevel)
 {
     return((int)sStats.AddScoring(stat, score));
 }
示例#26
0
 public void IncStat(string stat, Common.DebugLevel minLevel)
 {
     mManager.IncStat(stat, minLevel);
     mResult = stat;
 }
示例#27
0
 public int AddStat(string stat, int val, Common.DebugLevel minLevel)
 {
     mResult = stat + ": " + val;
     return(mManager.AddStat(stat, val, minLevel));
 }
示例#28
0
 public int AddScoring(string stat, int score, Common.DebugLevel minLevel)
 {
     mResult = stat + ": " + score;
     return(mManager.AddScoring(stat, score, minLevel));
 }
示例#29
0
 public int AddScoring(string scoring, int option, ScoringLookup.OptionType type, SimDescription sim, SimDescription other, Common.DebugLevel minLevel)
 {
     return(AddScoring(scoring, ScoringLookup.GetScore(scoring, option, type, sim, other), minLevel));
 }
示例#30
0
 public float AddStat(string stat, float val, Common.DebugLevel minLevel)
 {
     mEntry.Add(val);
     return(val);
 }