コード例 #1
0
        public void UpdateInteractable(OCIRoute _route)
        {
            if (_route == null || !_route.listPoint.Contains(this.m_OCIRoutePoint))
            {
                return;
            }
            bool flag = !_route.isPlay;

            this.inputSpeed.interactable = flag;
            ((Selectable)this.dropdownEase).set_interactable(flag);
            this.toggleConnection.interactable = flag;
            ((Selectable)this.toggleLink).set_interactable(flag);
            if (this.m_OCIRoutePoint.connection != OIRoutePointInfo.Connection.Curve || !this.m_OCIRoutePoint.link)
            {
                return;
            }
            int           index         = _route.listPoint.FindIndex((Predicate <OCIRoutePoint>)(p => p == this.m_OCIRoutePoint)) - 1;
            OCIRoutePoint ociRoutePoint = _route.listPoint.SafeGet <OCIRoutePoint>(index);

            if (ociRoutePoint == null || ociRoutePoint.connection != OIRoutePointInfo.Connection.Curve)
            {
                return;
            }
            this.inputSpeed.interactable = false;
            ((Selectable)this.dropdownEase).set_interactable(false);
        }
コード例 #2
0
 public bool Deselect(OCIRoute _ociRoute)
 {
     if (this.m_OCIRoute != _ociRoute)
     {
         return(false);
     }
     this.ociRoute = (OCIRoute)null;
     this.active   = false;
     return(true);
 }
コード例 #3
0
 private void OnClickStopAll()
 {
     foreach (ObjectInfo index in this.listInfo)
     {
         OCIRoute ctrlInfo = Studio.Studio.GetCtrlInfo(index.dicKey) as OCIRoute;
         ctrlInfo.Stop(true);
         this.dicNode[index].state = RouteNode.State.Stop;
         this.mpRouteCtrl.UpdateInteractable(ctrlInfo);
         this.mpRoutePointCtrl.UpdateInteractable(ctrlInfo);
     }
 }
コード例 #4
0
        public void UpdateInteractable(OCIRoute _route)
        {
            if (this.m_OCIRoute != _route)
            {
                return;
            }
            bool flag = !this.m_OCIRoute.isPlay;

            ((Selectable)this.buttonAddPoint).set_interactable(flag);
            this.toggleOrient.interactable = flag;
            ((Selectable)this.toggleLoop).set_interactable(flag);
        }
コード例 #5
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);
        }
コード例 #6
0
        public static OCIRoutePoint AddPoint(OCIRoute _ocir)
        {
            OIRoutePointInfo _rpInfo = new OIRoutePointInfo(Studio.Studio.GetNewIndex());

            _ocir.routeInfo.route.Add(_rpInfo);
            OCIRoutePoint ociRoutePoint = AddObjectRoute.LoadPoint(_ocir, _rpInfo, 1);

            _ocir.visibleLine = _ocir.visibleLine;
            Singleton <Studio.Studio> .Instance.treeNodeCtrl.RefreshHierachy();

            return(ociRoutePoint);
        }
コード例 #7
0
 private void OnClickALL()
 {
     foreach (ObjectInfo index in this.listInfo)
     {
         OCIRoute ctrlInfo = Studio.Studio.GetCtrlInfo(index.dicKey) as OCIRoute;
         if (!ctrlInfo.isPlay && ctrlInfo.Play())
         {
             this.dicNode[index].state = RouteNode.State.Play;
             this.mpRouteCtrl.UpdateInteractable(ctrlInfo);
             this.mpRoutePointCtrl.UpdateInteractable(ctrlInfo);
         }
     }
 }
コード例 #8
0
 public OCIRoutePoint(
     OCIRoute _route,
     OIRoutePointInfo _info,
     GameObject _obj,
     GuideObject _guide,
     TreeNodeObject _treeNode)
 {
     this.route          = _route;
     this.objectInfo     = (ObjectInfo)_info;
     this.objectItem     = _obj;
     this.guideObject    = _guide;
     this.treeNodeObject = _treeNode;
     this.routePoint     = (RoutePointComponent)_obj.GetComponent <RoutePointComponent>();
     this.isParentDelete = false;
     this._line          = (VectorLine)null;
 }
コード例 #9
0
        public void AddRoute()
        {
            OCIRoute ociRoute = AddObjectRoute.Add();

            if (this._routeControl.visible)
            {
                this._routeControl.Init();
            }
            Singleton <UndoRedoManager> .Instance.Clear();

            if (!Studio.Studio.optionSystem.autoSelect || ociRoute == null)
            {
                return;
            }
            this.m_TreeNodeCtrl.SelectSingle(ociRoute.treeNodeObject, true);
        }
コード例 #10
0
        private void OnPlay(int _idx)
        {
            OCIRoute ctrlInfo = Studio.Studio.GetCtrlInfo(this.listInfo[_idx].dicKey) as OCIRoute;

            if (ctrlInfo.isPlay)
            {
                ctrlInfo.Stop(true);
                this.dicNode[this.listInfo[_idx]].state = RouteNode.State.Stop;
            }
            else if (ctrlInfo.Play())
            {
                this.dicNode[this.listInfo[_idx]].state = RouteNode.State.Play;
            }
            this.mpRouteCtrl.UpdateInteractable(ctrlInfo);
            this.mpRoutePointCtrl.UpdateInteractable(ctrlInfo);
        }
コード例 #11
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);
            }
        }
コード例 #12
0
        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);
        }
コード例 #13
0
        public static OCIRoutePoint LoadPoint(
            OCIRoute _ocir,
            OIRoutePointInfo _rpInfo,
            int _initialPosition)
        {
            int        index      = !_ocir.listPoint.IsNullOrEmpty <OCIRoutePoint>() ? _ocir.listPoint.Count - 1 : -1;
            GameObject gameObject = CommonLib.LoadAsset <GameObject>("studio/base/00.unity3d", "p_RoutePoint", true, string.Empty);

            if (Object.op_Equality((Object)gameObject, (Object)null))
            {
                Studio.Studio.DeleteIndex(_rpInfo.dicKey);
                return((OCIRoutePoint)null);
            }
            gameObject.get_transform().SetParent(_ocir.objectItem.get_transform());
            GuideObject _guide = Singleton <GuideObjectManager> .Instance.Add(gameObject.get_transform(), _rpInfo.dicKey);

            _guide.isActive    = false;
            _guide.scaleSelect = 0.1f;
            _guide.scaleRot    = 0.05f;
            _guide.enablePos   = index != -1;
            _guide.enableRot   = index == -1;
            _guide.enableScale = false;
            _guide.mode        = GuideObject.Mode.World;
            _guide.moveCalc    = GuideMove.MoveCalc.TYPE2;
            TreeNodeObject childRoot = _ocir.treeNodeObject.childRoot;

            _ocir.treeNodeObject.childRoot = (TreeNodeObject)null;
            TreeNodeObject _treeNode = Studio.Studio.AddNode(_rpInfo.name, _ocir.treeNodeObject);

            _treeNode.treeState               = _rpInfo.treeState;
            _treeNode.enableChangeParent      = false;
            _treeNode.enableDelete            = index != -1;
            _treeNode.enableAddChild          = false;
            _treeNode.enableCopy              = false;
            _treeNode.enableVisible           = false;
            _guide.guideSelect.treeNodeObject = _treeNode;
            _ocir.treeNodeObject.childRoot    = childRoot;
            OCIRoutePoint _ocirp = new OCIRoutePoint(_ocir, _rpInfo, gameObject, _guide, _treeNode);

            _ocir.listPoint.Add(_ocirp);
            _ocir.UpdateNumber();
            _treeNode.onVisible += new TreeNodeObject.OnVisibleFunc(((ObjectCtrlInfo)_ocirp).OnVisible);
            _guide.isActiveFunc += new GuideObject.IsActiveFunc(((ObjectCtrlInfo)_ocirp).OnSelect);
            Studio.Studio.AddCtrlInfo((ObjectCtrlInfo)_ocirp);
            AddObjectRoute.InitAid(_ocirp);
            if (_initialPosition == 1)
            {
                if (index == -1)
                {
                    _rpInfo.changeAmount.pos = _ocir.objectInfo.changeAmount.pos;
                }
                else
                {
                    OCIRoutePoint ociRoutePoint = _ocir.listPoint[index];
                    _rpInfo.changeAmount.pos = _ocir.objectItem.get_transform().InverseTransformPoint(ociRoutePoint.position);
                }
            }
            _rpInfo.changeAmount.OnChange();
            _rpInfo.changeAmount.onChangePosAfter += new Action(_ocir.UpdateLine);
            _rpInfo.changeAmount.onChangeRot      += new Action(_ocir.UpdateLine);
            _ocirp.connection = _ocirp.connection;
            return(_ocirp);
        }