public static void LoadChild( BinaryReader _reader, Version _version, List <ObjectInfo> _list, bool _import) { int num1 = _reader.ReadInt32(); for (int index = 0; index < num1; ++index) { int num2 = _reader.ReadInt32(); switch (num2) { case 0: OICharInfo oiCharInfo = new OICharInfo((ChaFileControl)null, _import ? Studio.Studio.GetNewIndex() : -1); oiCharInfo.Load(_reader, _version, _import, true); _list.Add((ObjectInfo)oiCharInfo); break; case 1: OIItemInfo oiItemInfo = new OIItemInfo(-1, -1, -1, _import ? Studio.Studio.GetNewIndex() : -1); oiItemInfo.Load(_reader, _version, _import, true); _list.Add((ObjectInfo)oiItemInfo); break; case 2: OILightInfo oiLightInfo = new OILightInfo(-1, _import ? Studio.Studio.GetNewIndex() : -1); oiLightInfo.Load(_reader, _version, _import, true); _list.Add((ObjectInfo)oiLightInfo); break; case 3: OIFolderInfo oiFolderInfo = new OIFolderInfo(_import ? Studio.Studio.GetNewIndex() : -1); oiFolderInfo.Load(_reader, _version, _import, true); _list.Add((ObjectInfo)oiFolderInfo); break; case 4: OIRouteInfo oiRouteInfo = new OIRouteInfo(_import ? Studio.Studio.GetNewIndex() : -1); oiRouteInfo.Load(_reader, _version, _import, true); _list.Add((ObjectInfo)oiRouteInfo); break; case 5: OICameraInfo oiCameraInfo = new OICameraInfo(_import ? Studio.Studio.GetNewIndex() : -1); oiCameraInfo.Load(_reader, _version, _import, true); _list.Add((ObjectInfo)oiCameraInfo); break; default: Debug.LogWarning((object)string.Format("おかしい情報が入っている : {0}", (object)num2)); break; } } }
public static OCIRoute Load( OIRouteInfo _info, ObjectCtrlInfo _parent, TreeNodeObject _parentNode) { ChangeAmount _source = _info.changeAmount.Clone(); OCIRoute ociRoute = AddObjectRoute.Load(_info, _parent, _parentNode, false, -1); _info.changeAmount.Copy(_source, true, true, true); AddObjectAssist.LoadChild(_info.child, (ObjectCtrlInfo)ociRoute, (TreeNodeObject)null); return(ociRoute); }
public void Init() { int childCount = this.nodeRoot.get_childCount(); for (int index = 0; index < childCount; ++index) { Object.Destroy((Object)((Component)this.nodeRoot.GetChild(index)).get_gameObject()); } this.nodeRoot.DetachChildren(); this.scrollRect.set_verticalNormalizedPosition(1f); this.dicNode.Clear(); this.listInfo = ObjectInfoAssist.Find(4); for (int index = 0; index < this.listInfo.Count; ++index) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type RouteControl.\u003CInit\u003Ec__AnonStorey0 initCAnonStorey0 = new RouteControl.\u003CInit\u003Ec__AnonStorey0(); // ISSUE: reference to a compiler-generated field initCAnonStorey0.\u0024this = this; GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.objectNode); if (!gameObject.get_activeSelf()) { gameObject.SetActive(true); } gameObject.get_transform().SetParent(this.nodeRoot, false); RouteNode component = (RouteNode)gameObject.GetComponent <RouteNode>(); OIRouteInfo oiRouteInfo = this.listInfo[index] as OIRouteInfo; component.spritePlay = this.spritePlay; component.text = oiRouteInfo.name; // ISSUE: reference to a compiler-generated field initCAnonStorey0.no = index; // ISSUE: method pointer ((UnityEvent)component.buttonSelect.get_onClick()).AddListener(new UnityAction((object)initCAnonStorey0, __methodptr(\u003C\u003Em__0))); // ISSUE: method pointer ((UnityEvent)component.buttonPlay.get_onClick()).AddListener(new UnityAction((object)initCAnonStorey0, __methodptr(\u003C\u003Em__1))); OCIRoute ctrlInfo = Studio.Studio.GetCtrlInfo(this.listInfo[index].dicKey) as OCIRoute; component.state = !ctrlInfo.isEnd ? (!ctrlInfo.isPlay ? RouteNode.State.Stop : RouteNode.State.Play) : RouteNode.State.End; this.dicNode.Add(this.listInfo[index], component); } }
public static OCIRoute Load( OIRouteInfo _info, ObjectCtrlInfo _parent, TreeNodeObject _parentNode, bool _addInfo, int _initialPosition) { OCIRoute _ocir = new OCIRoute(); _ocir.objectInfo = (ObjectInfo)_info; GameObject gameObject = CommonLib.LoadAsset <GameObject>("studio/base/00.unity3d", "p_Route", true, string.Empty); if (Object.op_Equality((Object)gameObject, (Object)null)) { Studio.Studio.DeleteIndex(_info.dicKey); return((OCIRoute)null); } gameObject.get_transform().SetParent(Singleton <Scene> .Instance.commonSpace.get_transform()); _ocir.objectItem = gameObject; GuideObject guideObject = Singleton <GuideObjectManager> .Instance.Add(gameObject.get_transform(), _info.dicKey); guideObject.isActive = false; guideObject.scaleSelect = 0.1f; guideObject.scaleRot = 0.05f; guideObject.enableScale = false; guideObject.SetVisibleCenter(true); _ocir.guideObject = guideObject; _ocir.childRoot = gameObject.get_transform().GetChild(0); if (_addInfo) { Studio.Studio.AddInfo((ObjectInfo)_info, (ObjectCtrlInfo)_ocir); } else { Studio.Studio.AddObjectCtrlInfo((ObjectCtrlInfo)_ocir); } TreeNodeObject _parent1 = !Object.op_Inequality((Object)_parentNode, (Object)null) ? (_parent == null ? (TreeNodeObject)null : _parent.treeNodeObject) : _parentNode; TreeNodeObject _parent2 = Studio.Studio.AddNode(_info.name, _parent1); _parent2.treeState = _info.treeState; _parent2.enableVisible = true; _parent2.enableChangeParent = false; _parent2.visible = _info.visible; _parent2.colorSelect = _parent2.baseColor; _parent2.onVisible += new TreeNodeObject.OnVisibleFunc(((ObjectCtrlInfo)_ocir).OnVisible); _parent2.onDelete += new Action(_ocir.OnDeleteNode); _parent2.checkChild += new TreeNodeObject.CheckFunc(_ocir.CheckParentLoop); _parent2.checkParent += new TreeNodeObject.CheckFunc(_ocir.CheckParentLoop); guideObject.guideSelect.treeNodeObject = _parent2; _ocir.treeNodeObject = _parent2; _ocir.routeComponent = (RouteComponent)gameObject.GetComponent <RouteComponent>(); TreeNodeObject treeNodeObject = Studio.Studio.AddNode("子接続先", _parent2); treeNodeObject.enableChangeParent = false; treeNodeObject.enableDelete = false; treeNodeObject.enableCopy = false; treeNodeObject.baseColor = Utility.ConvertColor(204, 128, 164); treeNodeObject.colorSelect = treeNodeObject.baseColor; _parent2.childRoot = treeNodeObject; _ocir.childNodeRoot = treeNodeObject; if (_info.route.IsNullOrEmpty <OIRoutePointInfo>()) { _ocir.routeInfo.route.Add(new OIRoutePointInfo(Studio.Studio.GetNewIndex())); } foreach (OIRoutePointInfo _rpInfo in _info.route) { AddObjectRoute.LoadPoint(_ocir, _rpInfo, -1); } Singleton <Studio.Studio> .Instance.treeNodeCtrl.RefreshHierachy(); if (_initialPosition == 1) { _info.changeAmount.pos = Singleton <Studio.Studio> .Instance.cameraCtrl.targetPos; } _info.changeAmount.OnChange(); Studio.Studio.AddCtrlInfo((ObjectCtrlInfo)_ocir); _parent?.OnLoadAttach(!Object.op_Inequality((Object)_parentNode, (Object)null) ? _parent.treeNodeObject : _parentNode, (ObjectCtrlInfo)_ocir); _info.changeAmount.onChangePos += new Action(_ocir.UpdateLine); _info.changeAmount.onChangeRot += new Action(_ocir.UpdateLine); _ocir.ForceUpdateLine(); _ocir.visibleLine = _ocir.visibleLine; if (_ocir.isPlay) { _ocir.Play(); } else { _ocir.Stop(true); } return(_ocir); }