예제 #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            GameController controller = new GameController();
        }
예제 #2
0
        public AppForm(GameController controller) {
            this.gameController = controller;
            InitializeComponent();

            this.Cursor = Cursors.Cross;

            nameDialog.okButton.Click += onClickOkButton;
        }
        public GameStateUpdateWorker(GamePanel gamePanel, GameController gameController) {
            this.WorkerReportsProgress = true;
            this.DoWork += doBackgroundWork;
            this.ProgressChanged += progressChanged;
            this.WorkerSupportsCancellation = true;

            this.gamePanel = gamePanel;
            this.gameController = gameController;

            // Spawnpoints
            int posXSpawn = gamePanel.Width + 100;
            spawnPoints = new Point[3];
            spawnPoints[0] = new Point(posXSpawn, 100);
            spawnPoints[1] = new Point(posXSpawn, 170);
            spawnPoints[2] = new Point(posXSpawn, 240);

            MAX_TORPEDO_Y_POS = gamePanel.Height / 100 * 20;
        }