Beispiel #1
0
        //private Menu mainForm ;
        //public GameRun(Form callingForm)
        //{
        //    mainForm = callingForm as Menu;
        //    InitializeComponent();
        //}

        private void StartGame()
        {
            gameOver_lbl.Visible = false;
            Level_lbl.Text       = "0";
            new Settings();
            gameTimer.Interval = 1000 / Settings.Speed;

            Game = new Game();

            NewSnake();

            Life_lbl.Text          = Game.Life.ToString();
            foodremaining_lbl.Text = Game.FoodRemaining.ToString();

            Pause_lbl.Visible = true;
            //Speed_txt.Text = Settings.Speed.ToString();



            Score_lbl.Text = Settings.Score.ToString();
            Game.GenerateFood(pbCanvas.Size.Width, pbCanvas.Size.Height);
        }