public SceneViewModel(EditorGame game) { this.game = game; game.SceneSystem.SceneInstance.RootEntity = sceneRootEntity.Model; OpenCommand = new RelayCommand <EntityViewModel>(Open); DeleteCommand = new RelayCommand <EntityViewModel>(Delete); }
public Project(IGUIConfigurer configurer, EditorGame game, Editor editor, string name, string mapName, string mapTypename) { this.configurer = configurer; this.game = game; this.editor = editor; this.name = name; this.mapName = mapName; this.mapTypename = mapTypename; }
public MonoGameService(EditorGame editorGame, IProjectService projectService, ISceneService sceneService) { this._editorGame = editorGame; this._sceneService = sceneService; this._sceneService.PropertyChanged += this.SceneService_PropertyChanged; this._editorGame.CurrentScene = this._sceneService.CurrentScene?.Scene; this._projectService = projectService; this._projectService.PropertyChanged += this.ProjectService_PropertyChanged; this._editorGame.Settings = this._projectService.CurrentProject?.GameSettings; this.SetContentPath(); }
public SceneEditorViewModel(StorageFolderViewModel rootFolder, string scenePath) { RootFolder = rootFolder; ScenePath = scenePath; OpenCommand = new RelayCommand <EntityViewModel>(Open); DeleteCommand = new RelayCommand <EntityViewModel>(Delete); Game = new EditorGame(new GameContextWithGraphics { FileProvider = new FileSystemProvider(RootFolder.Model) }); Game.SceneSystem.SceneInstance.RootEntity = SceneRootEntity.Model; }
public LevelEditorViewModel(EditorGame game, IEventAggregator eventAggregator) { _game = game; _game.SetInitialScreen <LevelEditorScreen>(); _eventAggregator = eventAggregator; OnHorizontalScrollCommand = new DelegateCommand(OnHorizontalScroll); OnVerticalScrollCommand = new DelegateCommand(OnVerticalScroll); _eventAggregator.GetEvent <LevelOpenedEvent>().Subscribe(OnLevelLoaded); }
/// <summary> /// Build new tile map project from given project properties. /// </summary> public static Project BuildTileMapProject(NewProjectProperties properties, IntPtr windowHandle) { TileEngine tileEngine = new TileEngine(new Point(properties.MapWidth, properties.MapHeight), new Point(properties.TileWidth, properties.TileHeight)); TileEditor editor = new TileEditor(tileEngine); EditorGame game = new EditorGame(windowHandle, editor); return(new Project(new TileEditorGUIConfigurer(editor), game, editor, properties.ProjectName, properties.MapName, properties.MapType.ToString())); }
public SceneEditorViewModel(IStorageFolder rootFolder, string scenePath, IPropertyManager propertyManager) { RootFolder = rootFolder; ScenePath = scenePath; this.propertyManager = propertyManager; OpenCommand = new RelayCommand <EntityViewModel>(Open); DeleteCommand = new RelayCommand <EntityViewModel>(Delete); Game = new EditorGame(new GameContextWithGraphics { FileProvider = new FileSystemProvider(RootFolder) }); Game.SceneSystem.RootEntity = SceneRootEntity.Model; }
public SceneView(StorageFolderViewModel rootFolder) { InitializeComponent(); SharedShadow.Receivers.Add(SwapChainPanel); EntityTreeView.Translation += new Vector3(0.0f, 0.0f, 32.0f); ((StandardUICommand)Resources["OpenCommand"]).KeyboardAccelerators.Clear(); EditorGame game = new EditorGame(new XamlGameContext(SwapChainPanel), rootFolder.Model); //EditorGame game = new EditorGame(new GameContextWithGraphics(), rootFolder.Model); game.Run(); ViewModel = new SceneViewModel(game); }
public AnimationEditorViewModel(IFileSystem fileSystem, EditorGame game) { _fileSystem = fileSystem; _game = game; //_game.SetInitialScreen<AnimationEditorScreen>(); SelectSpriteSheetCommand = new DelegateCommand(SelectSpriteSheet); AddAnimationCommand = new DelegateCommand(AddAnimation); DeleteAnimationCommand = new DelegateCommand(DeleteAnimation); AddFrameCommand = new DelegateCommand(AddFrame); DeleteFrameCommand = new DelegateCommand(DeleteFrame); MoveFrameUpCommand = new DelegateCommand(MoveFrameUp); MoveFrameDownCommand = new DelegateCommand(MoveFrameDown); SelectFileRequest = new InteractionRequest <INotification>(); }
public LevelEditor(ImGuiRenderer _imgr, EditorGame _gme, Point _mapSize, string _mapName, Color _mapClearCol) : base(_imgr, _gme) { //Map constraints MapSize = _mapSize; MapName = _mapName; MapClearCol = _mapClearCol; //(So drawing tiles doesnt draw the window) ImGui.GetIO().ConfigWindowsMoveFromTitleBarOnly = true; ImGui.GetIO().Framerate = 60; //Configure layers TileLayers = new List <TilesetWorldLayer>(); TileLayers.Add(new TilesetWorldLayer(new CollisionTileSet(MapSize), "Collision", true, false)); LayerListPosition = 0; //Create rendertargets levelRenderTarget = new RenderTarget2D(_gme.GraphicsDevice, 16 * MapSize.X, 16 * MapSize.Y); gameRenderTarget = new RenderTarget2D(_gme.GraphicsDevice, Screen.GameWidth, Screen.GameHeight); //Set Tile Pallate textures tilePallateTexture = _imGuiRenderer.BindTexture(TileLayers[0].tileSet.TileSetTexture); tilePallateTextureSize = new Point(TileLayers[0].tileSet.TileSetTexture.Width, TileLayers[0].tileSet.TileSetTexture.Height); }
public EditorMenu(ImGuiRenderer _imgr, EditorGame _gme) { _imGuiRenderer = _imgr; _game = _gme; }
public static void Main(string[] args) { using (var game = new EditorGame()) game.Run(); }
public StartMenu(ImGuiRenderer _imgr, EditorGame _gme) : base(_imgr, _gme) { MinScreenSize = new Point((int)Math.Ceiling((double)Screen.GameWidth / 16), (int)Math.Ceiling((double)Screen.GameHeight / 16)); }
public void UnloadContent(EditorGame game) { }
public void Register(EditorGame game) { _mouse = new WpfMouse(game); _keyboard = new WpfKeyboard(game); }