public GamePage(string launchArguments) { game = XamlGame<Game1>.Create(launchArguments, Window.Current.CoreWindow, this); controlClient = game.Services.GetService(typeof(IControlClient)) as IControlClient; DataContext = new AuthoringViewModel(controlClient); this.InitializeComponent(); }
public void Load() { if (allLikedItems == null) { #if NETFX_CORE GetLocalSaveSwarmData(); #endif } spriteBatch = new SpriteBatch(screen.ScreenManager.GraphicsDevice); debugScreen = screen.ScreenManager.Game.Services.GetService(typeof(IDebugScreen)) as IDebugScreen; controlClient = screen.ScreenManager.Game.Services.GetService(typeof(IControlClient)) as IControlClient; Viewport viewport = screen.ScreenManager.GraphicsDevice.Viewport; position = new Vector2(screen.ScreenManager.GraphicsDevice.Viewport.Width - rect.Width, 0);// + _containerMargin; bgSprite = screen.ScreenManager.Content.Load <Texture2D>("Backgrounds/gray"); LabelFont = screen.ScreenManager.Fonts.DetailsFont; BigFont = screen.ScreenManager.Fonts.FrameRateCounterFont; for (int i = 0; i < menuEntries.Count; ++i) { menuEntries[i].Initialize(); } #if WINDOWS UpdateLikedItemsUI(); #endif allLikedItems = SaveHelper.Load("SwarmsSaves"); }
public GamePage(string launchArguments) { game = XamlGame <Game1> .Create(launchArguments, Window.Current.CoreWindow, this); controlClient = game.Services.GetService(typeof(IControlClient)) as IControlClient; DataContext = new AuthoringViewModel(controlClient); this.InitializeComponent(); }
public AuthoringViewModel(IControlClient controlClient) { controlViewModels = new List<ViewModels.ControlViewModel>() { new WorldControlViewModel(controlClient), new BrushControlViewModel(controlClient), new EraseControlViewModel(controlClient), new GameControlViewModel(controlClient) }; ControlViewModel = controlViewModels[0]; }
public AuthoringViewModel(IControlClient controlClient) { controlViewModels = new List <ViewModels.ControlViewModel>() { new WorldControlViewModel(controlClient), new BrushControlViewModel(controlClient), new EraseControlViewModel(controlClient), new GameControlViewModel(controlClient) }; ControlViewModel = controlViewModels[0]; }
public WorldControlViewModel(IControlClient controlClient) : base("World", "Earth.png", controlClient) { ChanceOfRandomSteering = controlClient.GetWorldRandomSteering(); SperatingForce = controlClient.GetWorldSeperatingForce(); AlligningForce = controlClient.GetWorldAligningForce(); CohesiveForce = controlClient.GetWorldCohesiveForce(); NormalSpeed = controlClient.GetWorldNormalSpeed(); MaxSpeed = controlClient.GetWorldMaxSpeed(); NumberOfIndividualsMax = controlClient.GetWorldNumberOfIndividuals(); NeighborhoodRadiusMax = controlClient.GetWorldNeighborhoodRadius(); }
public override void LoadContent() { individualTexture = ScreenManager.Content.Load <Texture2D>("point"); bigIndividualTexture = ScreenManager.Content.Load <Texture2D>("beebig"); superAgentTexture = ScreenManager.Content.Load <Texture2D>("Backgrounds/gray"); debugComponent = ScreenManager.Game.Services.GetService(typeof(IDebugScreen)) as IDebugScreen; controlClient = ScreenManager.Game.Services.GetService(typeof(IControlClient)) as IControlClient; Camera = new SwarmsCamera(ScreenManager.GraphicsDevice); Border = new Border(ScreenManager); base.LoadContent(); }
public BrushControlViewModel(IControlClient controlClient) : base("Brush", "Paint.png", controlClient) { ChanceOfRandomSteering = controlClient.GetBrushRandomSteering(); SperatingForce = controlClient.GetBrushSeperatingForce(); AlligningForce = controlClient.GetBrushAligningForce(); CohesiveForce = controlClient.GetBrushCohesiveForce(); NormalSpeed = controlClient.GetBrushNormalSpeed(); MaxSpeed = controlClient.GetBrushMaxSpeed(); NeighborhoodRadiusMax = controlClient.GetBrushNeighborhoodRadius(); BrushColor = controlClient.GetBrushColor(); IsMobile = controlClient.GetBrushIsMobile(); StartingDirection = controlClient.GetBrushStartingDirection(); IsUndo = controlClient.GetBrushIsUndo(); }
public GameControlViewModel(IControlClient controlClient) : base("Game", "Games.png", controlClient) { }
public ControlViewModel(string name, string iconPath, IControlClient controlclient) { Name = name; IconPath = ImageBasePath + iconPath; controlClient = controlclient; }
public ClientsController() { control = new ControlClient(); }
public void Load() { if (allLikedItems == null) { #if NETFX_CORE GetLocalSaveSwarmData(); #endif } spriteBatch = new SpriteBatch(screen.ScreenManager.GraphicsDevice); debugScreen = screen.ScreenManager.Game.Services.GetService(typeof(IDebugScreen)) as IDebugScreen; controlClient = screen.ScreenManager.Game.Services.GetService(typeof(IControlClient)) as IControlClient; Viewport viewport = screen.ScreenManager.GraphicsDevice.Viewport; position = new Vector2(screen.ScreenManager.GraphicsDevice.Viewport.Width - rect.Width, 0);// + _containerMargin; bgSprite = screen.ScreenManager.Content.Load<Texture2D>("Backgrounds/gray"); LabelFont = screen.ScreenManager.Fonts.DetailsFont; BigFont = screen.ScreenManager.Fonts.FrameRateCounterFont; for (int i = 0; i < menuEntries.Count; ++i) { menuEntries[i].Initialize(); } #if WINDOWS UpdateLikedItemsUI(); #endif allLikedItems = SaveHelper.Load("SwarmsSaves"); }
public EraseControlViewModel(IControlClient controlClient) : base("Erase", "X.png", controlClient) { EraseDiameter = controlClient.GetEraseDiameter(); }
public override void LoadContent() { individualTexture = ScreenManager.Content.Load<Texture2D>("point"); bigIndividualTexture = ScreenManager.Content.Load<Texture2D>("beebig"); superAgentTexture = ScreenManager.Content.Load<Texture2D>("Backgrounds/gray"); debugComponent = ScreenManager.Game.Services.GetService(typeof(IDebugScreen)) as IDebugScreen; controlClient = ScreenManager.Game.Services.GetService(typeof(IControlClient)) as IControlClient; Camera = new SwarmsCamera(ScreenManager.GraphicsDevice); Border = new Border(ScreenManager); base.LoadContent(); }