Exemplo n.º 1
0
        /// <summary>
        /// 第二步:等待难度秒数后抖动
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void FromFu1500ToFu300_Completed(object sender, object e)
        {
            //生成延时 难度速度控制
            if (level <= 4)
            {
                await Task.Delay(2500 + (1500 / level));
            }
            else if (level <= 10)
            {
                await Task.Delay(2000 + (1500 / level - 4));
            }
            else if (level <= 18)
            {
                await Task.Delay(1500 + (1500 / level - 10));
            }
            else if (level < 168)
            {
                await Task.Delay(1500 - ((level - 68) * 10));
            }

            foreach (Block itemBlock in BlockUplists)//所有要下落的格子全抖动三下;
            {
                BlockRectangle b1 = allBlockRectangles.First(retangle => retangle.Tag == itemBlock.Tag);
                b1.StartDoudon();
            }

            FromFu300DouDon.Begin();
            await Task.Delay(100);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 第二步:等待难度秒数后抖动
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void FromFu1500ToFu300_Completed(object sender, object e)
        {
            //生成延时 难度速度控制//地图1地图2共用计时器;
            if (level <= 4)
            {
                await Task.Delay(3600 - (300 * level));
            }
            else if (level <= 12)
            {
                await Task.Delay(2400 - (100 * (level - 4)));
            }
            else if (level <= 28)
            {
                await Task.Delay(1600 - (40 * (level - 12)));
            }
            else if (level <= 60)
            {
                await Task.Delay(960 - (20 * (level - 28)));
            }
            else if (level <= 100)
            {
                await Task.Delay(320 - (8 * (level - 40)));
            }

            foreach (Block itemBlock in BlockUplists)//所有要下落的格子全抖动三下;
            {
                BlockRectangle b1 = allBlockRectangles.First(retangle => retangle.Tag == itemBlock.Tag);
                b1.StartDoudon();
            }
            //这里写地图2所有要下落的格格抖动三下;
            foreach (Block itemBlock in BlockUplists2)
            {
                BlockRectangle b1 = allBlockRectangles2.First(retangle => retangle.Tag == itemBlock.Tag);
                b1.StartDoudon();
            }

            FromFu300DouDon.Begin();
            await Task.Delay(100);
        }
Exemplo n.º 3
0
 public void StartDoudon()
 {
     FromFu300DouDon.Begin();
 }