コード例 #1
0
 public PerspectiveViewModel(WorldViewModel worldViewModel, KeyPressedCheck keyPressed)
 {
     WorldViewModel = worldViewModel;
     _keyPressed    = keyPressed;
     Home.Execute(null);
     _movementTimer = new Stopwatch();
     _movementTimer.Start();
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 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);
 }
コード例 #4
0
 public PerspectiveViewModel(WorldViewModel worldViewModel, KeyPressedCheck keyPressed)
 {
     WorldViewModel = worldViewModel;
     _keyPressed = keyPressed;
     Home.Execute(null);
     _movementTimer = new Stopwatch();
     _movementTimer.Start();
 }
コード例 #5
0
 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);
 }