/// <summary> /// Load Story based on PackageCode /// </summary> /// <param name="component"></param> /// <param name="code"></param> public static bool LoadConversation(StoryComponent component, PackageCode code) { IPackage package = null; foreach (IPackage pack in _packages) { if (pack.Code == code) { package = pack; } } if (package == null) { return(false); } component.SetConversation(package.Conversations); return(true); }
public bool Actualize(ISceneNode node) { boundComponent = null; // todo: remove since we no longer select gizmos var gizmoComponent = node.SearchComponent <StoryFlowchartNodeGizmoComponent>(); var storyNode = gizmoComponent != null ? gizmoComponent.ReferencedNode : node; var storyComponent = storyNode.SearchComponent <StoryComponent>(); if (storyComponent == null) { return(false); } cShowAux1.Checked = storyComponent.ShowAux1; cShowAux2.Checked = storyComponent.ShowAux2; cDefaultAdaptiveStyle.SelectedKey = typeDict.First(x => x.Value == storyComponent.StartLayoutType).Key; cExplicitConnections.Content = BuildConnectionsLayout(node); boundComponent = storyComponent; return(true); }