Ejemplo n.º 1
0
 public bool OpenSceneItemInEditor(SceneItem item, bool isSceneInstance)
 {
     SceneItemType itemType = GetTypeOfSceneItem(item);
     SceneItemEditor editor = null;
     switch (itemType)
     {
         case SceneItemType.TileGrid:
             editor = new TileGridEditor();
             break;                
         case SceneItemType.ParticleEffect:
             editor = new ParticleEffectEditor();
             break;
         case SceneItemType.AnimatedSprite:
             editor = new AnimatedSpriteEditor();
             break;
         case SceneItemType.Sprite:
             editor = new SpriteEditor();
             break;
         case SceneItemType.PostProcessingAnimation:
             editor = new PostProcessAnimationEditor();
             break;
         case SceneItemType.CompositeEntity:
             editor = new CompositeEntityEditor();
             break;
         default:
             editor = null;
             break;
     }
     if (editor != null)
     {
         editor.SceneItem = item;
         editor.ItemIsLocal = isSceneInstance;
         editor.StartPosition = FormStartPosition.CenterParent;
         if (editor.ShowDialog(this) == DialogResult.OK)
         {
             if (SceneManager.GlobalDataHolder.TemplateItems.Contains(item))
             {
                 this.SceneWasModified = true;
             }
             else
             {
                 this.SceneWasModified = true;
             }
         }
     }
     return false;
 }
Ejemplo n.º 2
0
 public TileGridEditor()
 {
     InitializeComponent();
     this.TileGrid           = new TileGrid();
     TileGridEditor.Instance = this;
 }
Ejemplo n.º 3
0
 public TileGridEditor()
 {
     InitializeComponent();
     this.TileGrid = new TileGrid();
     TileGridEditor.Instance = this;
 }