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 OCICamera Load( OICameraInfo _info, ObjectCtrlInfo _parent, TreeNodeObject _parentNode) { ChangeAmount _source = _info.changeAmount.Clone(); OCICamera ociCamera = AddObjectCamera.Load(_info, _parent, _parentNode, false, -1); _info.changeAmount.Copy(_source, true, true, true); return(ociCamera); }
public static OCICamera Load( OICameraInfo _info, ObjectCtrlInfo _parent, TreeNodeObject _parentNode, bool _addInfo, int _initialPosition) { OCICamera ocic = new OCICamera(); ocic.objectInfo = (ObjectInfo)_info; GameObject gameObject = CommonLib.LoadAsset <GameObject>("studio/base/00.unity3d", "p_koi_stu_cameraicon00_00", true, string.Empty); if (Object.op_Equality((Object)gameObject, (Object)null)) { Studio.Studio.DeleteIndex(_info.dicKey); return((OCICamera)null); } gameObject.get_transform().SetParent(Singleton <Scene> .Instance.commonSpace.get_transform()); ocic.objectItem = gameObject; ocic.meshRenderer = (MeshRenderer)gameObject.GetComponent <MeshRenderer>(); 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; ocic.guideObject = guideObject; if (_addInfo) { Studio.Studio.AddInfo((ObjectInfo)_info, (ObjectCtrlInfo)ocic); } else { Studio.Studio.AddObjectCtrlInfo((ObjectCtrlInfo)ocic); } TreeNodeObject _parent1 = !Object.op_Inequality((Object)_parentNode, (Object)null) ? (_parent == null ? (TreeNodeObject)null : _parent.treeNodeObject) : _parentNode; TreeNodeObject treeNodeObject = Studio.Studio.AddNode(_info.name, _parent1); treeNodeObject.onVisible += new TreeNodeObject.OnVisibleFunc(((ObjectCtrlInfo)ocic).OnVisible); treeNodeObject.treeState = _info.treeState; treeNodeObject.enableVisible = true; treeNodeObject.enableAddChild = false; treeNodeObject.visible = _info.visible; treeNodeObject.baseColor = !_info.active ? AddObjectCamera.baseColor : AddObjectCamera.activeColor; treeNodeObject.colorSelect = treeNodeObject.baseColor; guideObject.guideSelect.treeNodeObject = treeNodeObject; ocic.treeNodeObject = treeNodeObject; ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerClickAsObservable((UIBehaviour)treeNodeObject.buttonSelect), (Action <M0>)(_ped => { if (_ped.get_button() != 1) { return; } Singleton <Studio.Studio> .Instance.ChangeCamera(ocic); Singleton <Studio.Studio> .Instance.manipulatePanelCtrl.UpdateInfo(5); })); if (_initialPosition == 1) { _info.changeAmount.pos = Singleton <Studio.Studio> .Instance.cameraCtrl.targetPos; } _info.changeAmount.OnChange(); Studio.Studio.AddCtrlInfo((ObjectCtrlInfo)ocic); _parent?.OnLoadAttach(!Object.op_Inequality((Object)_parentNode, (Object)null) ? _parent.treeNodeObject : _parentNode, (ObjectCtrlInfo)ocic); Singleton <Studio.Studio> .Instance.ChangeCamera(ocic, _info.active, false); return(ocic); }