当前位置: 首页>>代码示例>>C#>>正文


C# Figure.CanMoveDown方法代码示例

本文整理汇总了C#中Figure.CanMoveDown方法的典型用法代码示例。如果您正苦于以下问题:C# Figure.CanMoveDown方法的具体用法?C# Figure.CanMoveDown怎么用?C# Figure.CanMoveDown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Figure的用法示例。


在下文中一共展示了Figure.CanMoveDown方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: timer1_Tick

        private void timer1_Tick(object sender, EventArgs e)
        {
            if (!slowTime.Enabled)
            {
                timer1.Interval = GetSpeed(userStat.scoresCount);
            }
            else timer1.Interval = 500;
            label1.Text = userStat.scoresCount.ToString();
            if (posJ[0] < 24 && posJ[1] < 24 && posJ[2] < 24 && posJ[3] < 24 && name.CanMoveDown(_Labels, posI, posJ))
            {
                name.MoveDown(_Labels, posI, posJ);
                field.Draw(_Labels);
            }
            else
            {
                while (field.CanRemoveLine(_Labels))
                {
                    field.RemoveLine(_Labels, field.GetNumberOfLine(_Labels));
                    field.Draw(_Labels);
                    userStat.scoresCount += 1000;
                }
                if (figureName == "Bomb")
                {
                    name.Boom(_Labels, posI, posJ);
                }
                name = nextFigure;
                name.GetStartPosition(_Labels, posI, posJ);
                nextFigure = GetFigure();
                nextFigField.Clear(nextFig);
                nextFigure.GetStartPosition(nextFig, nextFigPosI, nextFigPosJ);
                if (nextFigPosJ[3] != 3)
                {
                    nextFigure.MoveDown(nextFig, nextFigPosI, nextFigPosJ);
                }
                nextFigField.Draw(nextFig);
                if (!name.CanMoveDown(_Labels, posI, posJ))
                {
                    timer1.Enabled = false;

                    if (recTable.CanChangeTabl(scores, userStat.scoresCount))
                    {
                        userStat.playerPosition = recTable.GetPlayerPosition(scores, userStat.scoresCount);
                        Form2 yourName = new Form2();
                        yourName.ShowDialog();
                        playerName = yourName.textBox1.Text;
                        recTable.ChangeTabl(names, scores, playerName, userStat.scoresCount.ToString(), userStat.playerPosition);
                        recTable.ReadTable(names, scores);
                        ShowTable(names, scores);
                    }
                    for (int i = 0; i < 8; i++)
                    {
                        if (achievments[i].isCompleted(userStat) && !achAreCompleted[i])
                        {
                            achAreCompleted[i] = true;
                            isUnlocked = true;
                        }

                    }
                    userStat.playerPosition = -1;
                    achFile.WriteAchievments(achAreCompleted);
                    UnlockAchievments(achAreCompleted);
                    if (isUnlocked)
                    {
                        newAch.Visible = true;
                    }
                    field.Draw(_Labels);
                    timer1.Enabled = false;
                    LNewGame.Enabled = true;
                    LRecords.Enabled = true;
                    ShowAchievments.Enabled = true;
                    label3.Enabled = true;

                }
                field.Draw(_Labels);
            }
        }
开发者ID:KaRDiograf,项目名称:Prolonged-suffering,代码行数:76,代码来源:Form1.cs


注:本文中的Figure.CanMoveDown方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。