public bool LoadEntity(GameObject entity) { var editor = new GameObjectEditor(); editor.SetEntity(entity); editor.LinkedEditor = this; MainScreen.Instance.AddEditor(editor, false); var localEntity = new GameObject(entity.Animation); foreach (var item in entity.Animations.Values) { localEntity.Animations[item.Name] = item; } Objects.Add(new ResizableObject(ResizableObject.ObjectType.GameObject, localEntity)); GameObjectPanel.RebuildListBox(); localEntity.Position = entity.Position; LinkedGameObjects.Add(localEntity, entity); FixLinkedObjectTitles(); return(true); }
public bool LoadEntity(GameObject entity) { var editor = new GameObjectEditor(); editor.SetEntity(entity); editor.LinkedEditor = this; EditorConsoleManager.AddEditor(editor, false); var localEntity = new GameObject(entity.Font); foreach (var item in entity.Animations.Values) localEntity.Animations.Add(item.Name, item); localEntity.Animation = localEntity.Animations[entity.Animation.Name]; localEntity.RenderOffset = consoleWrapper.Position; Objects.Add(new ResizableObject(ResizableObject.ObjectType.GameObject, localEntity)); GameObjectPanel.RebuildListBox(); localEntity.Position = entity.Position; localEntity.RenderOffset = consoleWrapper.Position - consoleWrapper.TextSurface.RenderArea.Location; LinkedGameObjects.Add(localEntity, entity); FixLinkedObjectTitles(); return true; }