public StorePresenter(MapPresenter.IView mapPresenterView, IView view, GameContext gameContext, INotificationView notificationView) { _mapPresenterView = mapPresenterView; _view = view; _gameContext = gameContext; _notificationView = notificationView; _visibleStores = new List<StoreNode>(); _gameContext.UserMoved += new EventHandler(_gameContext_UserMoved); _gameContext.HotZoneIdChanged += new EventHandler(_gameContext_HotZoneIdChanged); _gameContext.UserInventoryChanged += new EventHandler<UserInventoryChangedEventArgs>(_gameContext_UserInventoryChanged); }
public HotZonePresenter(MapPresenter.IView mapPresenterView, IView view, GameContext gameContext) { _gameContext = gameContext; _gameContext.UserMoved += new EventHandler(_gameContext_UserMoved); _gameContext.ZombiePackDestroyed += new EventHandler<ZombiePackDestroyedEventArgs>(_gameContext_ZombiePackDestroyed); _gameContext.ZoomLevelChanged += new EventHandler<ZoomLevelChangedEventArgs>(_gameContext_ZoomLevelChanged); _gameContext.UserInitalized += new EventHandler(_gameContext_UserInitalized); _mapPresenterView = mapPresenterView; _zombiePackCounts = new List<KeyValuePair<Guid, int>>(); _currentHotZoneId = Guid.Empty; _view = view; }
/// <summary> /// Constructor. /// </summary> /// <param name="view"></param> /// <param name="gameContext"></param> public HuntPresenter(MapPresenter.IView mapPresenterView, IView view, GameContext gameContext, INotificationView notificationView) { //set the view and the game context _view = view; _mapPresenterView = mapPresenterView; _gameContext = gameContext; _currentZombiePackId = Guid.Empty; _notificationView = notificationView; _visibleZombiePacks = new List<Node>(); //wire up to the user moved event for the game context _gameContext.UserAttackPowerChanged += new EventHandler(_gameContext_UserAttackPowerChanged); _gameContext.HotZoneIdChanged += new EventHandler(_gameContext_HotZoneIdChanged); _gameContext.UserMoved += new EventHandler(_gameContext_UserMoved); }
private void Application_Startup(object sender, StartupEventArgs e) { //parse out the base uri string baseUri = e.InitParams["BaseUri"]; Guid userId = new Guid(e.InitParams["UserId"]); GameContext gameContext = new GameContext { BaseUri = baseUri, UserId = userId, }; GameContext = gameContext; AnimationProvider = new AnimationProvider(); this.RootVisual = new MainPage(); }
public ZombiePackProgressUserControl() { InitializeComponent(); if(App.IsNotInDesignMode(this)) { _gameContext = App.GameContext; _presenter = new HuntPresenter(App.MapPresenterView, this, _gameContext, App.NotificationView); if (_huntIcon == null) { string uri = String.Concat(_gameContext.BaseUri, "Content/", "images/", "zombie.png"); _huntIcon = new BitmapImage(new Uri(uri)); _fadeIn = App.AnimationProvider.GetFadeInAnimation(this); _fadeOut = App.AnimationProvider.GetFadeOutAnimation(this); _fadeOut.Completed += new EventHandler(_fadeOut_Completed); } Loaded += new RoutedEventHandler(ZombiePackProgressUserControl_Loaded); } }
/// <summary> /// Initializes a new instance of the LevelUpPresenter class. /// </summary> public LevelUpPresenter(IView view, GameContext gameContext) { _view = view; _gameContext = gameContext; }