Exemple #1
0
        private void gameLogic_CellChange(object sender, CellChangeEventArgs e)
        {
            FallingPictureBox coinPlayer = getNewCoin();

            coinPlayer.Location            = new Point(e.Col * 65, 0);
            coinPlayer.Size                = new Size(65, 65);
            coinPlayer.MouseClick         += new MouseEventHandler(coin_Click);
            coinPlayer.PictureDoneFalling += new DoneFallingEventHendeler(coin_DoneFalling);
            m_BorderPanel.Controls.Add(coinPlayer);
            coinPlayer.StartFall(e.Row, e.Col);
            enabledPanel(false);
        }
Exemple #2
0
        private FallingPictureBox getNewCoin()
        {
            FallingPictureBox coinPlayer;

            if (m_GameLogic.CurrentPlayer == m_GameLogic.PlayerOne)
            {
                coinPlayer = new FallingPictureBox(m_Coin1Picture);
            }
            else
            {
                coinPlayer = new FallingPictureBox(m_Coin2Picture);
            }

            return(coinPlayer);
        }