protected StringFormatter GetFormattedHitCount(HitCountTuple tuple)
        {
            var formatter = StringFormatter.GetHitCountFormatter();

            foreach (var arg in formatter)
            {
                switch (arg)
                {
                case "n300":
                    formatter.Fill(arg, tuple.Count300); break;

                case "n100":
                    formatter.Fill(arg, tuple.Count100); break;

                case "n50":
                    formatter.Fill(arg, tuple.Count50); break;

                case "nmiss":
                    formatter.Fill(arg, tuple.CountMiss); break;

                case "combo":
                    formatter.Fill(arg, tuple.Combo); break;

                case "maxcombo":
                    formatter.Fill(arg, tuple.MaxCombo); break;

                case "fullcombo":
                    formatter.Fill(arg, tuple.FullCombo); break;
                }
            }

            return(formatter);
        }
        public override void OnUpdateHitCount(HitCountTuple tuple)
        {
            var formatter = GetFormattedHitCount(tuple);

            string str = formatter.ToString();

            if (m_win != null)
            {
                m_win.HitCountContext = formatter.ToString();
            }
        }
        /// <summary>
        /// Clear Output
        /// </summary>
        public virtual void Clear()
        {
            lock (_mtx)
            {
                foreach (var ctx in s_exprCtx.Values)
                {
                    foreach (var k in ctx.Variables.Keys)
                    {
                        ctx.Variables[k] = 0;
                    }
                }
            }

            HitCount = new HitCountTuple();
            Pp       = new PPTuple();
        }
Exemplo n.º 4
0
        private void UpdateContextVariablesFromHitCountTuple(ExpressionContext ctx, HitCountTuple tuple)
        {
            ctx.Variables["n300g"] = tuple.CountGeki;
            ctx.Variables["n300"]  = tuple.Count300;
            ctx.Variables["n200"]  = tuple.CountKatu;
            ctx.Variables["n100"]  = tuple.Count100;
            ctx.Variables["n150"]  = tuple.Count100;
            ctx.Variables["n50"]   = tuple.Count50;
            ctx.Variables["nmiss"] = tuple.CountMiss;
            ctx.Variables["ngeki"] = tuple.CountGeki;
            ctx.Variables["nkatu"] = tuple.CountKatu;

            ctx.Variables["current_maxcombo"] = tuple.CurrentMaxCombo;
            ctx.Variables["fullcombo"]        = tuple.FullCombo;
            ctx.Variables["maxcombo"]         = tuple.PlayerMaxCombo;
            ctx.Variables["player_maxcombo"]  = tuple.PlayerMaxCombo;
            ctx.Variables["combo"]            = tuple.Combo;
        }
Exemplo n.º 5
0
        protected StringFormatter GetFormattedHitCount(HitCountTuple tuple)
        {
            var formatter = StringFormatter.GetHitCountFormatter();

            m_hit_count_expr_data["n300g"] = tuple.CountGeki;
            m_hit_count_expr_data["n300"]  = tuple.Count300;
            m_hit_count_expr_data["n200"]  = tuple.CountKatu;
            m_hit_count_expr_data["n100"]  = tuple.Count100;
            m_hit_count_expr_data["n150"]  = tuple.Count100;
            m_hit_count_expr_data["n50"]   = tuple.Count50;
            m_hit_count_expr_data["nmiss"] = tuple.CountMiss;
            m_hit_count_expr_data["ngeki"] = tuple.CountGeki;
            m_hit_count_expr_data["nkatu"] = tuple.CountKatu;

            m_hit_count_expr_data["rtmaxcombo"] = tuple.RealTimeMaxCombo;
            m_hit_count_expr_data["fullcombo"]  = tuple.FullCombo;
            m_hit_count_expr_data["maxcombo"]   = tuple.PlayerMaxCombo;
            m_hit_count_expr_data["combo"]      = tuple.Combo;


            foreach (var arg in formatter)
            {
                Expression <int> expr;
                if (!m_hit_count_expression_dict.ContainsKey(arg))
                {
                    expr      = new Expression <int>(arg);
                    expr.Data = m_hit_count_expr_data;
                    m_hit_count_expression_dict[arg] = expr;
                }
                else
                {
                    expr = m_hit_count_expression_dict[arg];
                }

                formatter.Fill(arg, expr.EvalInt());
            }

            return(formatter);
        }
 /// <summary>
 /// Update HitCount
 /// </summary>
 /// <param name="n300">300 count</param>
 /// <param name="n100">100 count</param>
 /// <param name="n50">50 count</param>
 /// <param name="nmiss">miss count</param>
 /// <param name="combo">current combo</param>
 /// <param name="max_combo">current max combo</param>
 public abstract void OnUpdateHitCount(HitCountTuple tuple);
        public override void OnUpdateHitCount(HitCountTuple tuple)
        {
            var formatter = GetFormattedHitCount(tuple);

            m_hit_str_len = formatter.CopyTo(0, m_hit_buffer, 0);
        }
Exemplo n.º 8
0
 /// <summary>
 /// Clear Output
 /// </summary>
 public virtual void Clear()
 {
     HitCount = new HitCountTuple();
     Pp       = new PPTuple();
 }