Exemple #1
0
        private void timer3_Tick(object sender, EventArgs e)
        {
            Graphics g = Play2.CreateGraphics();

            //g.DrawString("▲", new Font("宋体", 14), Brushes.Red, new PointF(this.Width / 2 - 400, this.Height / 2));
            g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
            Brush bush = new SolidBrush(Color.Red); //填充的颜色

            g.FillEllipse(bush, 10, 10, 15, 15);    //
            g.Dispose();
        }
Exemple #2
0
        public Selector update(GameTime gameTime)
        {
            switch (state)
            {
            case State.START:
                state = start.update(gameTime, Keyboard.GetState());
                break;

            case State.SELECTION:
                state = selection.update(gameTime, Keyboard.GetState());
                if (state == State.PLAY1)
                {
                    play1 = new Play1();
                    play1.initialize();
                }
                else if (state == State.PLAY2)
                {
                    play2 = new Play2();
                    play2.initialize();
                }
                break;

            case State.PLAY1:
                state = play1.update(gameTime, Keyboard.GetState());
                break;

            case State.PLAY2:
                state = play2.update(gameTime, Keyboard.GetState());
                break;

            case State.MENU1:
                state = menu1.update(gameTime, Keyboard.GetState());
                break;

            case State.MENU2:
                state = menu2.update(gameTime, Keyboard.GetState());
                break;

            case State.EXIT:
                return(Selector.MAIN_SELECTOR);
            }
            return(Selector.TICTACTOE);
        }