예제 #1
0
        int t = 0; //used for point-adding

        #endregion Fields

        #region Constructors

        public Bouncy()
        {
            InitializeComponent();
            login login = new login();
            login.ShowDialog();
            this.StartPosition = FormStartPosition.CenterScreen;
            this.MaximizeBox = false;
            beveg.Interval = 10;
            obstSpawn.Interval = new Random().Next(1500,3000);
            obstSpawn.Tick += ObstSpawn_Tick; //adds the tick event for the timer
            obstSpawn.Start();
            obstMove.Interval = 10;
            obstMove.Tick += ObstMove_Tick; //adds the tick event for the timer
            obstMove.Start();
            beveg.Tick += beveg_event; //adds the tick event for the timer
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            user2.Text = login.user;
            button1.Enabled = false;
        }
예제 #2
0
        private List <Panel> obstacles = new List <Panel>(); //a list for all the obstacles
        public Bouncy()

        {
            InitializeComponent();
            login login = new login();

            login.ShowDialog();
            this.StartPosition = FormStartPosition.CenterScreen;
            this.MaximizeBox   = false;
            beveg.Interval     = 10;
            obstSpawn.Interval = new Random().Next(1500, 3000);
            obstSpawn.Tick    += ObstSpawn_Tick; //adds the tick event for the timer
            obstSpawn.Start();
            obstMove.Interval = 10;
            obstMove.Tick    += ObstMove_Tick;  //adds the tick event for the timer
            obstMove.Start();
            beveg.Tick          += beveg_event; //adds the tick event for the timer
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            user2.Text           = login.user;
            button1.Enabled      = false;
        }