예제 #1
0
        private void btnStart_Click(object sender, EventArgs e)
        {
            Form lvlSelecet = new LevelSelectScreen(this, startupConfig);

            lvlSelecet.FormClosing += delegate { this.Close(); };
            hideForm();
            lvlSelecet.Show();
        }
예제 #2
0
        public GameScreen(Level lvl, LevelSelectScreen lss)
        {
            InitializeComponent();
            grap               = this.CreateGraphics();
            formSize           = this.getSize();
            this.lvl           = lvl;
            this.lss           = lss;
            this.startupConfig = Config.deserializeConfig(Config.confFilePath);

            DoubleBuffered    = true;
            firstStartForBall = true;
            timer             = new Timer();
            timer.Interval    = 50;
            timer.Tick       += new EventHandler(timer_Tick);
            leftX             = 1;
            topY = dynamicHeigth;

            this.Width  = startupConfig.width + 18;
            this.Height = startupConfig.height + 18;

            width  = startupConfig.width;
            height = this.Height - (int)(2.5 * topY);
        }