public PerspectiveViewModel(WorldViewModel worldViewModel, KeyPressedCheck keyPressed) { WorldViewModel = worldViewModel; _keyPressed = keyPressed; Home.Execute(null); _movementTimer = new Stopwatch(); _movementTimer.Start(); }
public PerspectiveView(WorldViewModel worldViewModel) { InitializeComponent(); _worldViewModel = worldViewModel; Perspective = new PerspectiveViewModel(worldViewModel, renderTarget.IsKeyPressed); renderTarget.AutomaticUpdateFPS = 60; renderTarget.Render += renderTargetUserControl_Render; renderTarget.RenderUI += PerspectiveViewControl_RenderUI; renderTarget.MouseEnter += PerspectiveViewControl_MouseEnter; renderTarget.MouseDown += PerspectiveViewControl_MouseDown; renderTarget.MouseUp += PerspectiveViewControl_MouseUp; renderTarget.MouseMove += PerspectiveViewControl_MouseMove; }
public PerspectiveView(WorldViewModel worldViewModel) { InitializeComponent(); _worldViewModel = worldViewModel; Perspective = new PerspectiveViewModel(worldViewModel, renderTarget.IsKeyPressed); renderTarget.AutomaticUpdateFPS = 60; renderTarget.Render += renderTargetUserControl_Render; renderTarget.RenderUI += PerspectiveViewControl_RenderUI; renderTarget.MouseEnter += PerspectiveViewControl_MouseEnter; renderTarget.MouseDown += PerspectiveViewControl_MouseDown; renderTarget.MouseUp += PerspectiveViewControl_MouseUp; renderTarget.MouseMove += PerspectiveViewControl_MouseMove; renderTarget.MouseDoubleClick += (s, e) => _worldViewModel.FollowSelected.Execute(null); }
public static bool Init(Window mainWindow, WorldViewModel worldViewModel) { WorldViewModel = worldViewModel; return WPFAppWorld.Init(mainWindow, "user:Logs/Strive.log") && WPFAppWorld.MapLoad("Maps/Gr1d/Map.map", true); }