コード例 #1
0
        public Level2()
        {
            FileName            = string.Empty;
            mousePoint          = new Point();
            this.DoubleBuffered = true;
            InitializeComponent();
            barrel              = new Barrel(new Point(40, 475));
            aim                 = new Aim();
            radians             = 0;
            ammo                = new AmmoMagazine();
            hits                = 0;
            total               = 0;
            increase            = true;
            speed               = 0; // max speed 25, min speed 0
            healthBar.Visible   = true;
            drawAim             = true;
            RopeHit             = false;
            barrel.ropeHeight   = 80;
            barrel.ropeWidth    = 3;
            barrel.wallHeight   = 300;
            barrel.wallWidth    = 10;
            barrel.wallPosX     = 630;
            barrel.wallPosY     = 10;
            barrel.buttonPosX   = 480;
            barrel.buttonPosY   = 415;
            barrel.buttonHeight = 20;
            barrel.buttonWidth  = 20;

            GC.Collect();
            GC.WaitForPendingFinalizers();
        }
コード例 #2
0
        public MainGameWindow()
        {
            this.DoubleBuffered = true;
            InitializeComponent();
            FileName          = string.Empty;
            mousePoint        = new Point();
            barrel            = new Barrel(new Point(130, 460));
            aim               = new Aim();
            radians           = 0;
            ammo              = new AmmoMagazine();
            hits              = 0;
            total             = 0;
            increase          = true;
            speed             = 0; // max speed 25, min speed 0
            healthBar.Visible = true;
            drawAim           = true;

            GC.Collect();
            GC.WaitForPendingFinalizers();
        }