public TestBattleZone(int width, int height) { zoneNumber = -3; this.width = width; this.height = height; setDrawLocation(new Vector2(0, 0)); createLists(); level1 = new CollisionMap(height, width); collisionMap.Add(level1); level1Trans = new TransitionMap(height, width); transitionMap.Add(level1Trans); level1TrafficMap = new TrafficMap(height, width); trafficMap.Add(level1TrafficMap); level1EnemyMap = new EnemyMap(height, width); enemyMap.Add(level1EnemyMap); fillLevel1(); fillLevel1Trans(); createSpawners(); }
public TestZone(int width, int height) { zoneNumber = -1; this.width = width; this.height = height; setDrawLocation(new Vector2(0, 0)); createLists(); //levels.Add(Image.FromFile("../../../Images/Zones/TestGrassZoneFloor1.png")); //levels.Add(Image.FromFile("../../../Images/Zones/TestGrassZoneFloor2.png")); level1 = new CollisionMap(height, width); level2 = new CollisionMap(height, width); collisionMap.Add(level1); collisionMap.Add(level2); level1Trans = new TransitionMap(height, width); level2Trans = new TransitionMap(height, width); transitionMap.Add(level1Trans); transitionMap.Add(level2Trans); fillLevel1(); fillLevel2(); fillLevel1Trans(); fillLevel2Trans(); level1TrafficMap = new TrafficMap(height, width); level2TrafficMap = new TrafficMap(height, width); trafficMap.Add(level1TrafficMap); trafficMap.Add(level2TrafficMap); fillLevel1TrafficMap(); level1EnemyMap = new EnemyMap(height, width); level2EnemyMap = new EnemyMap(height, width); enemyMap.Add(level1EnemyMap); enemyMap.Add(level2EnemyMap); }
private void SetupWizardTransitionMap() { TransitionMap.Add <ExportDataWizardChooseTypeViewModel, ExportDataWizardCsvFolderViewModel>(ExportDataWizardPage.ChooseCsvFolder); TransitionMap.Add <ExportDataWizardChooseTypeViewModel, ExportDataWizardSqlConnBuilderViewModel>(ExportDataWizardPage.BuildSqlConnection); TransitionMap.Add <ExportDataWizardCsvFolderViewModel, ExportDataWizardChooseTablesViewModel>(ExportDataWizardPage.ChooseTables); TransitionMap.Add <ExportDataWizardSqlConnBuilderViewModel, ExportDataWizardSqlConnStrViewModel>(ExportDataWizardPage.ManualConnectionString); TransitionMap.Add <ExportDataWizardSqlConnBuilderViewModel, ExportDataWizardChooseTablesViewModel>(ExportDataWizardPage.ChooseTables); TransitionMap.Add <ExportDataWizardSqlConnStrViewModel, ExportDataWizardChooseTablesViewModel>(ExportDataWizardPage.ChooseTables); TransitionMap.Add <ExportDataWizardChooseTablesViewModel, ExportDataWizardExportStatusViewModel>(ExportDataWizardPage.ExportStatus); }
protected override IScreen DetermineNextItemToActivate(IList <IScreen> list, int lastIndex) { object nextScreen; if (list[lastIndex] is ExportDataWizardBasePageViewModel theScreenThatJustClosed && !theScreenThatJustClosed.BackClicked) { theScreenThatJustClosed.BackClicked = false; _previousPages.Push(theScreenThatJustClosed); var nextScreenType = TransitionMap.GetNextScreenType(theScreenThatJustClosed); nextScreen = Activator.CreateInstance(nextScreenType, this); }
protected override IScreen DetermineNextItemToActivate(IList <IScreen> list, int lastIndex) { var theScreenThatJustClosed = list[lastIndex] as BaseViewModel; var state = theScreenThatJustClosed.WorkflowState; var nextScreenType = TransitionMap.GetNextScreenType(theScreenThatJustClosed); var nextScreen = Activator.CreateInstance(nextScreenType, state); return(nextScreen as IScreen); }
private void initializeMap() { TransitionMap.Add <Input1ViewModel, Question2ViewModel>(StateTransition.Input1Success); TransitionMap.Add <Input1ViewModel, Input1ViewModel>(StateTransition.Cancel); TransitionMap.Add <Question2ViewModel, Input3ViewModel>(StateTransition.Option1); TransitionMap.Add <Question2ViewModel, Finalize4ViewModel>(StateTransition.Option2); TransitionMap.Add <Question2ViewModel, Input1ViewModel>(StateTransition.Cancel); TransitionMap.Add <Input3ViewModel, Finalize4ViewModel>(StateTransition.Input3Success); TransitionMap.Add <Input3ViewModel, Input1ViewModel>(StateTransition.Cancel); TransitionMap.Add <Finalize4ViewModel, Input1ViewModel>(StateTransition.Cancel); }
public LongMessageModalDialog() { TransitionMap.Add("Ok", NoTransition); TransitionMap.Add("Cancel", NoTransition); TransitionMap.Add("Something", NoTransition); }
public LoremIpsumModalDialog() { TransitionMap.Add("Ok", NoTransition); TransitionMap.Add("Cancel", NoTransition); }
protected Screen TransitionFromResponse(string response) { return(TransitionMap[response]()); }