Esempio n. 1
0
        private bool SetGuideObject(GuideObject _object)
        {
            bool flag = Input.GetKey((KeyCode)306) || Input.GetKey((KeyCode)305);
            bool key  = Input.GetKey((KeyCode)120);

            if (flag && !key)
            {
                if (this.hashSelectObject.Contains(_object))
                {
                    return(false);
                }
                this.AddObject(_object);
            }
            else
            {
                foreach (GuideObject guideObject in this.hashSelectObject)
                {
                    ChangeAmount changeAmount = guideObject.changeAmount;
                    changeAmount.onChangePos   -= new Action(this.SetInputTextPos);
                    changeAmount.onChangeRot   -= new Action(this.SetInputTextRot);
                    changeAmount.onChangeScale -= new Action <Vector3>(this.SetInputTextScale);
                }
                this.hashSelectObject.Clear();
                this.AddObject(_object);
            }
            return(true);
        }
Esempio n. 2
0
        private void OnDragTransY()
        {
            Vector3 vector3;

            ((Vector3) ref vector3).\u002Ector(0.0f, Input.GetAxis("Mouse Y"), 0.0f);
            ChangeAmount caMap = Singleton <Studio.Studio> .Instance.sceneInfo.caMap;

            caMap.pos = Vector3.op_Addition(caMap.pos, this.transMap.TransformDirection(vector3));
        }
Esempio n. 3
0
 public MoveCopyInfo(int _dicKey, ChangeAmount _old, ChangeAmount _new)
 {
     this.dicKey   = _dicKey;
     this.oldValue = new Vector3[2] {
         _old.pos, _old.rot
     };
     this.newValue = new Vector3[2] {
         _new.pos, _new.rot
     };
 }
Esempio n. 4
0
        public static ChangeAmount GetChangeAmount(int _key)
        {
            if (!Singleton <Studio.Studio> .IsInstance())
            {
                return((ChangeAmount)null);
            }
            ChangeAmount changeAmount = (ChangeAmount)null;

            return(Singleton <Studio.Studio> .Instance.dicChangeAmount.TryGetValue(_key, out changeAmount) ? changeAmount : (ChangeAmount)null);
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
 public void Undo()
 {
     for (int index = 0; index < this.changeAmountInfo.Length; ++index)
     {
         ChangeAmount changeAmount = Studio.Studio.GetChangeAmount(this.changeAmountInfo[index].dicKey);
         if (changeAmount != null)
         {
             changeAmount.pos = this.changeAmountInfo[index].oldValue;
         }
     }
 }
Esempio n. 7
0
 public TargetInfo(GameObject _gameObject, ChangeAmount _changeAmount, bool _new)
 {
     this.gameObject   = _gameObject;
     this.changeAmount = _changeAmount;
     if (_new)
     {
         this.CopyBone();
     }
     this.changeAmount.defRot = this.transform.get_localEulerAngles();
     this.baseRot             = this.transform.get_localEulerAngles();
 }
        public static OCILight Load(
            OILightInfo _info,
            ObjectCtrlInfo _parent,
            TreeNodeObject _parentNode)
        {
            ChangeAmount _source  = _info.changeAmount.Clone();
            OCILight     ociLight = AddObjectLight.Load(_info, _parent, _parentNode, false, -1);

            _info.changeAmount.Copy(_source, true, true, true);
            return(ociLight);
        }
Esempio n. 9
0
 public void Undo()
 {
     for (int index = 0; index < this.changeAmountInfo.Length; ++index)
     {
         ChangeAmount changeAmount1 = Studio.Studio.GetChangeAmount(this.changeAmountInfo[index].dicKey);
         if (changeAmount1 != null)
         {
             ChangeAmount changeAmount2 = changeAmount1;
             changeAmount2.pos = Vector3.op_Subtraction(changeAmount2.pos, this.changeAmountInfo[index].value);
         }
     }
 }
Esempio n. 10
0
 public void Do()
 {
     for (int index = 0; index < this.changeAmountInfo.Length; ++index)
     {
         ChangeAmount changeAmount1 = Studio.Studio.GetChangeAmount(this.changeAmountInfo[index].dicKey);
         if (changeAmount1 != null)
         {
             ChangeAmount changeAmount2 = changeAmount1;
             changeAmount2.rot = Vector3.op_Addition(changeAmount2.rot, this.changeAmountInfo[index].value);
         }
     }
 }
Esempio n. 11
0
        public static OCIItem Load(
            OIItemInfo _info,
            ObjectCtrlInfo _parent,
            TreeNodeObject _parentNode)
        {
            ChangeAmount _source = _info.changeAmount.Clone();
            OCIItem      ociItem = AddObjectItem.Load(_info, _parent, _parentNode, false, -1);

            _info.changeAmount.Copy(_source, true, true, true);
            AddObjectAssist.LoadChild(_info.child, (ObjectCtrlInfo)ociItem, (TreeNodeObject)null);
            return(ociItem);
        }
Esempio n. 12
0
        public static OCIFolder Load(
            OIFolderInfo _info,
            ObjectCtrlInfo _parent,
            TreeNodeObject _parentNode)
        {
            ChangeAmount _source   = _info.changeAmount.Clone();
            OCIFolder    ociFolder = AddObjectFolder.Load(_info, _parent, _parentNode, false, -1);

            _info.changeAmount.Copy(_source, true, true, true);
            AddObjectAssist.LoadChild(_info.child, (ObjectCtrlInfo)ociFolder, (TreeNodeObject)null);
            return(ociFolder);
        }
Esempio n. 13
0
        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);
        }
Esempio n. 14
0
 public void Do()
 {
     for (int index = 0; index < this.changeAmountInfo.Length; ++index)
     {
         ChangeAmount changeAmount = Studio.Studio.GetChangeAmount(this.changeAmountInfo[index].dicKey);
         if (changeAmount != null)
         {
             changeAmount.pos = this.changeAmountInfo[index].newValue[0];
             changeAmount.rot = this.changeAmountInfo[index].newValue[1];
         }
     }
 }
Esempio n. 15
0
        private void AddObject(GuideObject _object)
        {
            if (Object.op_Equality((Object)_object, (Object)null))
            {
                return;
            }
            ChangeAmount changeAmount = _object.changeAmount;

            changeAmount.onChangePos   += new Action(this.SetInputTextPos);
            changeAmount.onChangeRot   += new Action(this.SetInputTextRot);
            changeAmount.onChangeScale += new Action <Vector3>(this.SetInputTextScale);
            this.hashSelectObject.Add(_object);
        }
Esempio n. 16
0
        private bool DeselectGuideObject(GuideObject _object)
        {
            if (Object.op_Equality((Object)_object, (Object)null) || !this.hashSelectObject.Contains(_object))
            {
                return(false);
            }
            ChangeAmount changeAmount = _object.changeAmount;

            changeAmount.onChangePos   -= new Action(this.SetInputTextPos);
            changeAmount.onChangeRot   -= new Action(this.SetInputTextRot);
            changeAmount.onChangeScale -= new Action <Vector3>(this.SetInputTextScale);
            this.hashSelectObject.Remove(_object);
            return(true);
        }
Esempio n. 17
0
            public void Load(BinaryReader _reader, int _ver)
            {
                this.group    = _reader.ReadInt32();
                this.category = _reader.ReadInt32();
                this.no       = _reader.ReadInt32();
                if (_ver >= 101)
                {
                    this.normalizedTime = _reader.ReadSingle();
                }
                this.enableIK = _reader.ReadBoolean();
                for (int index = 0; index < this.activeIK.Length; ++index)
                {
                    this.activeIK[index] = _reader.ReadBoolean();
                }
                int num1 = _reader.ReadInt32();

                for (int index = 0; index < num1; ++index)
                {
                    int          key          = _reader.ReadInt32();
                    ChangeAmount changeAmount = new ChangeAmount();
                    changeAmount.Load(_reader);
                    try
                    {
                        this.dicIK.Add(key, changeAmount);
                    }
                    catch (Exception ex)
                    {
                        Debug.Log((object)key);
                    }
                }
                this.enableFK = _reader.ReadBoolean();
                for (int index = 0; index < this.activeFK.Length; ++index)
                {
                    this.activeFK[index] = _reader.ReadBoolean();
                }
                int num2 = _reader.ReadInt32();

                for (int index = 0; index < num2; ++index)
                {
                    int          key          = _reader.ReadInt32();
                    ChangeAmount changeAmount = new ChangeAmount();
                    changeAmount.Load(_reader);
                    this.dicFK.Add(key, changeAmount);
                }
                for (int index = 0; index < this.expression.Length; ++index)
                {
                    this.expression[index] = _reader.ReadBoolean();
                }
            }
Esempio n. 18
0
 public static void AddChangeAmount(int _key, ChangeAmount _ca)
 {
     if (!Singleton <Studio.Studio> .IsInstance())
     {
         return;
     }
     try
     {
         Singleton <Studio.Studio> .Instance.dicChangeAmount.Add(_key, _ca);
     }
     catch (Exception ex)
     {
         Debug.Log((object)_key);
     }
 }
Esempio n. 19
0
 public void Copy(ChangeAmount _source, bool _pos = true, bool _rot = true, bool _scale = true)
 {
     if (_pos)
     {
         this.pos = _source.pos;
     }
     if (_rot)
     {
         this.rot = _source.rot;
     }
     if (!_scale)
     {
         return;
     }
     this.scale = _source.scale;
 }
Esempio n. 20
0
        public bool LoadScene(string _path)
        {
            if (!File.Exists(_path))
            {
                return(false);
            }
            this.InitScene(false);
            this.sceneInfo = new SceneInfo();
            if (!this.sceneInfo.Load(_path))
            {
                return(false);
            }
            AddObjectAssist.LoadChild(this.sceneInfo.dicObject, (ObjectCtrlInfo)null, (TreeNodeObject)null);
            ChangeAmount _source = this.sceneInfo.caMap.Clone();

            this.AddMap(this.sceneInfo.map, false, false, true);
            this.mapList.UpdateInfo();
            this.sceneInfo.caMap.Copy(_source, true, true, true);
            Singleton <MapCtrl> .Instance.Reflect();

            this.bgmCtrl.Play(this.bgmCtrl.no);
            this.envCtrl.Play(this.envCtrl.no);
            this.outsideSoundCtrl.Play(this.outsideSoundCtrl.fileName);
            this.m_BackgroundCtrl.Load(this.sceneInfo.background);
            this.m_BackgroundList.UpdateUI();
            this._frameCtrl.Load(this.sceneInfo.frame);
            this._frameList.UpdateUI();
            this.m_SystemButtonCtrl.UpdateInfo();
            this.treeNodeCtrl.RefreshHierachy();
            if (this.sceneInfo.cameraSaveData != null)
            {
                this.m_CameraCtrl.Import(this.sceneInfo.cameraSaveData);
            }
            this.cameraLightCtrl.Reflect();
            this._cameraSelector.Init();
            this.sceneInfo.dataVersion = this.sceneInfo.version;
            this.rootButtonCtrl.OnClick(-1);
            return(true);
        }
Esempio n. 21
0
 public TargetInfo(
     GameObject _gameObject,
     ChangeAmount _changeAmount,
     OIBoneInfo.BoneGroup _group,
     int _level)
 {
     this.gameObject   = _gameObject;
     this.changeAmount = _changeAmount;
     this.group        = _group;
     this.level        = _level;
     if ((this.group & OIBoneInfo.BoneGroup.Hair) == (OIBoneInfo.BoneGroup) 0 && (this.group & OIBoneInfo.BoneGroup.Skirt) == (OIBoneInfo.BoneGroup) 0 && (this.group & OIBoneInfo.BoneGroup.Body) == (OIBoneInfo.BoneGroup) 0)
     {
         return;
     }
     ObservableExtensions.Subscribe <bool>((IObservable <M0>) this._enable, (Action <M0>)(_b =>
     {
         if (_b)
         {
             return;
         }
         this.transform.set_localRotation(Quaternion.get_identity());
         this.syncBoneInfo.SafeProc <OCIChar.SyncBoneInfo>((Action <OCIChar.SyncBoneInfo>)(_sbi => _sbi.LocalRotation = Quaternion.get_identity()));
     }));
 }