public Game(IGameForm parent) { _status = new GameStatus {GameOver = false}; _parentForm = parent; InitializeForm(); }
/// <summary> /// Play button event. Starts the game. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void MyPlayerForm_BtnPlay(object sender, EventArgs e) { if (myGameForm.IsDisposed) { myGameForm = myGameForm.CreateNewInstance(); } myGameForm.Show(); }
public Game(IGameForm parent) { _status = new GameStatus { GameOver = false }; _parentForm = parent; InitializeForm(); }
public GamePresenter(IGameForm view) { this.view = view; view.LeftClickEvent += View_LeftClickEvent; view.RightClickEvent += View_RightClickEvent; view.StartGameEvent += View_LevelEvent; view.StartCustomGameEvent += View_StartCustomGameEvent; view.TimerTick += View_TimerTick; view.AgainClicked += View_AgainClicked; }
/// <summary> /// Creates a player and the player form. /// </summary> /// <param name="players"></param> /// <param name="playerForm"></param> public PlayerPresenter(IPlayerForm playerForm, IGameForm gameForm) { player1 = new Player(); player2 = new Player(); myPlayerForm = playerForm; playerList = new List <IPlayer>(); myGameForm = gameForm; myPlayerForm.Load += MyPlayerForm_Load; }
public LVLPresenter(IGameForm view, IGUIPresenter v, LvlImplementation curLVL) { this.CurLvl = curLVL; curLVL.AddFishes(); curLVL.SetDeep(); this.view = view; this.gui = v; view.LVLPresenter = this; view.BackImage = CurLvl.Image; _sp = new SoundPlayer(); _drawer = new Drawer(); view.RepaintScreen += View_RepaintScreen; view.FormMouseClick += View_MouseLeftClick; view.KeyDOWN += View_KeyDOWN; view.KeyUP += View_KeyUP; view.MainTimerTick += View_MainTimerTick; view.FormClose += View_FormClose; view.DecSacietyTimerTick += View_DecSacietyTimerTick; }
public AsteroidsGame(IGameForm parent, IGameController gameController) : base(parent) { StartNewRound(); _gameController = gameController; }
/// <summary> /// Add a Child form to this form /// </summary> /// <param name="form">The form to add</param> public void AddForm(IGameForm form) { ChildForms.Add(form.Name, form); form.ParentForm = this; form.Content = this.Content; form.UI = this.UI; }
/// <summary> /// コンストラクタです。 /// </summary> /// <param name="args"></param> /// <param name="form"></param> protected GameCore(PPDExecuteArg args, IGameForm form) : base(args, new TextEditableControl()) { Form = form; gameTimer = new GameTimer(); }
public CheckerGame(IGameForm form, IBoardDrawingMachine drawingMachine) : base(form) { _drawingMachine = drawingMachine; }