Пример #1
0
 /// <summary>
 /// The set level editor pane.
 /// </summary>
 /// <param name="game">
 /// The Game instance.
 /// </param>
 public void SetLevelEditorPane(LevelEditorPane game)
 {
     this.levelEditorPane = game;
     this.levelEditorPane.CameraPositionChanged            += this.LevelEditorPane_CameraPositionChanged;
     this.levelEditorPane.SelectedComponentChanged         += this.LevelEditorPane_SelectedComponentChanged;
     this.levelEditorPane.SelectedComponentPropertyChanged +=
         this.LevelEditorPane_SelectedComponentPropertyChanged;
     this.levelEditorPane.LevelComponentsChanged += this.LevelEditorPane_LevelComponentsChanged;
     this.xnaRenderTarget.LevelEditorPane         = game;
 }
Пример #2
0
 private static void Main(string[] args)
 {
     Application.EnableVisualStyles();
     using (var form = new LevelEditorForm())
     {
         form.Show();
         using (var game = new LevelEditorPane(form.GetDrawSurface()))
         {
             form.SetLevelEditorPane(game);
             game.Run();
         }
     }
 }