示例#1
0
        private static void FindLoop(ref List <ObjectInfo> _list, ObjectInfo _src, int _kind)
        {
            if (_src == null)
            {
                return;
            }
            if (_src.kind == _kind)
            {
                _list.Add(_src);
            }
            switch (_src.kind)
            {
            case 0:
                using (Dictionary <int, List <ObjectInfo> > .Enumerator enumerator = (_src as OICharInfo).child.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        foreach (ObjectInfo _src1 in enumerator.Current.Value)
                        {
                            ObjectInfoAssist.FindLoop(ref _list, _src1, _kind);
                        }
                    }
                    break;
                }

            case 1:
                using (List <ObjectInfo> .Enumerator enumerator = (_src as OIItemInfo).child.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        ObjectInfo current = enumerator.Current;
                        ObjectInfoAssist.FindLoop(ref _list, current, _kind);
                    }
                    break;
                }

            case 3:
                using (List <ObjectInfo> .Enumerator enumerator = (_src as OIFolderInfo).child.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        ObjectInfo current = enumerator.Current;
                        ObjectInfoAssist.FindLoop(ref _list, current, _kind);
                    }
                    break;
                }

            case 4:
                using (List <ObjectInfo> .Enumerator enumerator = (_src as OIRouteInfo).child.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        ObjectInfo current = enumerator.Current;
                        ObjectInfoAssist.FindLoop(ref _list, current, _kind);
                    }
                    break;
                }
            }
        }
示例#2
0
        public static List <ObjectInfo> Find(int _kind)
        {
            List <ObjectInfo> _list = new List <ObjectInfo>();

            foreach (KeyValuePair <int, ObjectInfo> keyValuePair in Singleton <Studio.Studio> .Instance.sceneInfo.dicObject)
            {
                ObjectInfoAssist.FindLoop(ref _list, keyValuePair.Value, _kind);
            }
            return(_list);
        }
示例#3
0
 public void ReflectOption()
 {
     if (this.listInfo.IsNullOrEmpty <ObjectInfo>())
     {
         this.listInfo = ObjectInfoAssist.Find(4);
     }
     foreach (OCIRoute ociRoute in this.listInfo.Select <ObjectInfo, OCIRoute>((Func <ObjectInfo, OCIRoute>)(i => Studio.Studio.GetCtrlInfo(i.dicKey) as OCIRoute)))
     {
         ociRoute.UpdateLine();
     }
 }
示例#4
0
        public void Init()
        {
            this.dropdown.ClearOptions();
            List <ObjectInfo> objectInfoList = ObjectInfoAssist.Find(5);

            this.listCamera = objectInfoList.Select <ObjectInfo, OCICamera>((Func <ObjectInfo, OCICamera>)(i => Studio.Studio.GetCtrlInfo(i.dicKey) as OCICamera)).ToList <OCICamera>();
            this.index      = 0;
            List <TMP_Dropdown.OptionData> optionDataList = !objectInfoList.IsNullOrEmpty <ObjectInfo>() ? objectInfoList.Select <ObjectInfo, TMP_Dropdown.OptionData>((Func <ObjectInfo, TMP_Dropdown.OptionData>)(c => new TMP_Dropdown.OptionData((Studio.Studio.GetCtrlInfo(c.dicKey) as OCICamera).name))).ToList <TMP_Dropdown.OptionData>() : new List <TMP_Dropdown.OptionData>();

            optionDataList.Insert(0, new TMP_Dropdown.OptionData("-"));
            this.dropdown.set_options(optionDataList);
            ((Selectable)this.dropdown).set_interactable(!objectInfoList.IsNullOrEmpty <ObjectInfo>());
            this.SetCamera(Singleton <Studio.Studio> .Instance.ociCamera);
        }
示例#5
0
        public override void Load(BinaryReader _reader, Version _version, bool _import, bool _tree = true)
        {
            base.Load(_reader, _version, _import, true);
            this.name = _reader.ReadString();
            ObjectInfoAssist.LoadChild(_reader, _version, this.child, _import);
            int num = _reader.ReadInt32();

            for (int index = 0; index < num; ++index)
            {
                OIRoutePointInfo oiRoutePointInfo = new OIRoutePointInfo(-1);
                oiRoutePointInfo.Load(_reader, _version, false, true);
                this.route.Add(oiRoutePointInfo);
            }
            this.active      = _reader.ReadBoolean();
            this.loop        = _reader.ReadBoolean();
            this.visibleLine = _reader.ReadBoolean();
            this.orient      = (OIRouteInfo.Orient)_reader.ReadInt32();
            this.color       = (Color)JsonUtility.FromJson <Color>(_reader.ReadString());
        }
示例#6
0
        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);
            }
        }
示例#7
0
        public override void Load(BinaryReader _reader, Version _version, bool _import, bool _tree = true)
        {
            base.Load(_reader, _version, _import, true);
            this.group    = _reader.ReadInt32();
            this.category = _reader.ReadInt32();
            this.no       = _reader.ReadInt32();
            if (_version.CompareTo(new Version(1, 0, 1)) >= 0)
            {
                this.animePattern = _reader.ReadInt32();
            }
            this.animeSpeed = _reader.ReadSingle();
            for (int index = 0; index < 4; ++index)
            {
                this.colors[index].Load(_reader, _version);
            }
            this.alpha         = _reader.ReadSingle();
            this.emissionColor = (Color)JsonUtility.FromJson <Color>(_reader.ReadString());
            this.emissionPower = _reader.ReadSingle();
            this.lightCancel   = _reader.ReadSingle();
            this.panel.Load(_reader, _version);
            this.enableFK = _reader.ReadBoolean();
            int num1 = _reader.ReadInt32();

            for (int index1 = 0; index1 < num1; ++index1)
            {
                string index2 = _reader.ReadString();
                this.bones[index2] = new OIBoneInfo(_import ? Studio.Studio.GetNewIndex() : -1);
                this.bones[index2].Load(_reader, _version, _import, true);
            }
            this.enableDynamicBone = _reader.ReadBoolean();
            int num2 = _reader.ReadInt32();

            for (int index = 0; index < num2; ++index)
            {
                this.option.Add(_reader.ReadBoolean());
            }
            this.animeNormalizedTime = _reader.ReadSingle();
            ObjectInfoAssist.LoadChild(_reader, _version, this.child, _import);
        }
示例#8
0
        public override void Load(BinaryReader _reader, Version _version, bool _import, bool _tree = true)
        {
            base.Load(_reader, _version, _import, true);
            this.sex      = _reader.ReadInt32();
            this.charFile = new ChaFileControl();
            this.charFile.LoadCharaFile(_reader, true, false);
            int num1 = _reader.ReadInt32();

            for (int index1 = 0; index1 < num1; ++index1)
            {
                int index2 = _reader.ReadInt32();
                this.bones[index2] = new OIBoneInfo(_import ? Studio.Studio.GetNewIndex() : -1);
                this.bones[index2].Load(_reader, _version, _import, true);
            }
            int num2 = _reader.ReadInt32();

            for (int index1 = 0; index1 < num2; ++index1)
            {
                int index2 = _reader.ReadInt32();
                this.ikTarget[index2] = new OIIKTargetInfo(_import ? Studio.Studio.GetNewIndex() : -1);
                this.ikTarget[index2].Load(_reader, _version, _import, true);
            }
            int num3 = _reader.ReadInt32();

            for (int index1 = 0; index1 < num3; ++index1)
            {
                int index2 = _reader.ReadInt32();
                ObjectInfoAssist.LoadChild(_reader, _version, this.child[index2], _import);
            }
            this.kinematicMode      = (OICharInfo.KinematicMode)_reader.ReadInt32();
            this.animeInfo.group    = _reader.ReadInt32();
            this.animeInfo.category = _reader.ReadInt32();
            this.animeInfo.no       = _reader.ReadInt32();
            for (int index = 0; index < 2; ++index)
            {
                this.handPtn[index] = _reader.ReadInt32();
            }
            this.nipple    = _reader.ReadSingle();
            this.siru      = _reader.ReadBytes(5);
            this.mouthOpen = _reader.ReadSingle();
            this.lipSync   = _reader.ReadBoolean();
            if (this.lookAtTarget == null)
            {
                this.lookAtTarget = new LookAtTargetInfo(_import ? Studio.Studio.GetNewIndex() : -1);
            }
            this.lookAtTarget.Load(_reader, _version, _import, true);
            this.enableIK = _reader.ReadBoolean();
            for (int index = 0; index < 5; ++index)
            {
                this.activeIK[index] = _reader.ReadBoolean();
            }
            this.enableFK = _reader.ReadBoolean();
            for (int index = 0; index < 7; ++index)
            {
                this.activeFK[index] = _reader.ReadBoolean();
            }
            for (int index = 0; index < 8; ++index)
            {
                this.expression[index] = _reader.ReadBoolean();
            }
            this.animeSpeed         = _reader.ReadSingle();
            this.animePattern       = _reader.ReadSingle();
            this.animeOptionVisible = _reader.ReadBoolean();
            this.isAnimeForceLoop   = _reader.ReadBoolean();
            this.voiceCtrl.Load(_reader, _version);
            this.visibleSon          = _reader.ReadBoolean();
            this.sonLength           = _reader.ReadSingle();
            this.visibleSimple       = _reader.ReadBoolean();
            this.simpleColor         = (Color)JsonUtility.FromJson <Color>(_reader.ReadString());
            this.animeOptionParam[0] = _reader.ReadSingle();
            this.animeOptionParam[1] = _reader.ReadSingle();
            int count1 = _reader.ReadInt32();

            this.neckByteData = _reader.ReadBytes(count1);
            int count2 = _reader.ReadInt32();

            this.eyesByteData        = _reader.ReadBytes(count2);
            this.animeNormalizedTime = _reader.ReadSingle();
            int num4 = _reader.ReadInt32();

            if (num4 != 0)
            {
                this.dicAccessGroup = new Dictionary <int, TreeNodeObject.TreeState>();
            }
            for (int index = 0; index < num4; ++index)
            {
                this.dicAccessGroup[_reader.ReadInt32()] = (TreeNodeObject.TreeState)_reader.ReadInt32();
            }
            int num5 = _reader.ReadInt32();

            if (num5 != 0)
            {
                this.dicAccessNo = new Dictionary <int, TreeNodeObject.TreeState>();
            }
            for (int index = 0; index < num5; ++index)
            {
                this.dicAccessNo[_reader.ReadInt32()] = (TreeNodeObject.TreeState)_reader.ReadInt32();
            }
        }
 public override void Load(BinaryReader _reader, Version _version, bool _import, bool _tree = true)
 {
     base.Load(_reader, _version, _import, true);
     this.name = _reader.ReadString();
     ObjectInfoAssist.LoadChild(_reader, _version, this.child, _import);
 }