Exemplo n.º 1
0
    public void Init(string wordContent, WordPanel parentWordPanel)
    {
        if (ParentWordPanel == null)
        {
            // 内容赋值
            WordContent     = wordContent;
            ParentWordPanel = parentWordPanel;

            // 初始化字母
            NextLetterIndex = 0;
            CreateLetters();
        }
    }
Exemplo n.º 2
0
        public void Create()
        {
            SelectWord();
            IsActive      = false;
            IsDoublePoint = false;
            IsJoker       = false;

            BlockData  = new Block[GamePanel.Current.RowCount, GamePanel.Current.ColumnCount];
            ColumnData = new int[GamePanel.Current.ColumnCount];
            //EmptyRowData = new int[GamePanel.Current.ColumnCount];
            Array.Clear(ColumnData, 0, ColumnData.Length);

            /*
             * for (int i = 0; i < EmptyRowData.Count(); i++)
             *  EmptyRowData[i] = GamePanel.Current.RowCount - 1;
             */

            gameTimer          = new DispatcherTimer();
            gameTimer.Tick    += createBlock_CallBack;
            gameTimer.Interval = TimeSpan.FromMilliseconds(200);

            WordPanel.Create();
        }