Example #1
0
        /// <summary>
        /// 添加弹幕
        /// </summary>
        /// <param name="text">文字</param>
        /// <param name="mode">模式</param>
        /// <param name="speed">速度</param>
        public void AddBarrage(String text, int mode, int speed)
        {
            Barrage barrage = new Barrage();

            barrage.Text  = text;
            barrage.Speed = speed;
            barrage.Mode  = mode;
            m_barrageDiv.AddBarrage(barrage);
        }
Example #2
0
        /// <summary>
        /// 提示
        /// </summary>
        /// <param name="var">变量</param>
        /// <returns>结果</returns>
        public double ADDBARRAGE(CVariable var)
        {
            String text = "";
            int    len  = var.m_parameters.Length;

            for (int i = 0; i < len; i++)
            {
                text += m_indicator.GetText(var.m_parameters[i]);
            }
            BarrageDiv barrageDiv = (m_xml as MainFrame).FindControl("divBarrage") as BarrageDiv;
            Barrage    barrage    = new Barrage();

            barrage.Text = text;
            barrage.Mode = 0;
            barrageDiv.AddBarrage(barrage);
            return(1);
        }