public override void Enter(Action _action, Track _track)
        {
            GameObject gameObject = _action.GetGameObject(this.parentId);

            if (gameObject == null)
            {
                return;
            }
            if (this.targetId >= 0)
            {
                _action.ExpandGameObject(this.targetId);
                GameObject gameObject2 = _action.GetGameObject(this.targetId);
                if (gameObject2 != null)
                {
                    return;
                }
                if (this.isGetByName)
                {
                    Transform[] componentsInChildren = gameObject.GetComponentsInChildren <Transform>();
                    for (int i = 0; i < componentsInChildren.Length; i++)
                    {
                        if (componentsInChildren[i].gameObject.name == this.subObjectName)
                        {
                            gameObject2 = componentsInChildren[i].gameObject;
                            break;
                        }
                    }
                }
                else if (gameObject.transform.childCount > 0)
                {
                    gameObject2 = gameObject.transform.GetChild(0).gameObject;
                }
                _action.SetGameObject(this.targetId, gameObject2);
            }
        }
Beispiel #2
0
        public override void Process(Action _action, Track _track)
        {
            GameObject gameObject = _action.GetGameObject(this.parentId);

            if (gameObject != null)
            {
                GameObject go = _action.GetGameObject(this.targetId);
                if (this.isGetByName)
                {
                    Transform[] componentsInChildren = gameObject.GetComponentsInChildren <Transform>();
                    for (int i = 0; i < componentsInChildren.Length; i++)
                    {
                        if (componentsInChildren[i].gameObject.name == this.subObjectName)
                        {
                            go = componentsInChildren[i].gameObject;
                            break;
                        }
                    }
                }
                else if (gameObject.transform.childCount > 0)
                {
                    go = gameObject.transform.GetChild(0).gameObject;
                }
                _action.SetGameObject(this.targetId, go);
            }
        }
Beispiel #3
0
        private Quaternion GetLookRotation(Action _action)
        {
            GameObject gameObject = _action.GetGameObject(this.cameraId);

            if (gameObject == null)
            {
                return(Quaternion.identity);
            }
            GameObject obj3   = _action.GetGameObject(this.targetId);
            Vector3    vector = new Vector3(0f, 0f, 0f);

            if (obj3 == null)
            {
                vector = this.localOffset + this.worldOffset;
            }
            else
            {
                vector = (obj3.transform.position + obj3.transform.TransformDirection(this.localOffset)) + this.worldOffset;
            }
            Vector3 forward = vector - gameObject.transform.position;

            if (this.UpDirType == EUpDirType.NoOverrideUp)
            {
                return(Quaternion.LookRotation(forward, gameObject.transform.up));
            }
            Quaternion quaternion = Quaternion.AngleAxis(this.rowAngleByZ, Vector3.forward);

            return(Quaternion.LookRotation(forward, Vector3.up) * quaternion);
        }
Beispiel #4
0
 public override void ProcessBlend(Action _action, Track _track, TickEvent _prevEvent, float _blendWeight)
 {
     if ((_action.GetGameObject(this.cameraId) != null) && (_prevEvent != null))
     {
         _action.GetGameObject(this.cameraId).transform.rotation = Quaternion.Slerp((_prevEvent as CameraLookAt).GetLookRotation(_action), this.GetLookRotation(_action), _blendWeight);
     }
 }
        public override void Leave(Action _action, Track _track)
        {
            GameObject gameObject = _action.GetGameObject(this.srcId);
            GameObject obj3       = _action.GetGameObject(this.atkerId);

            base.Leave(_action, _track);
        }
 public override void ProcessBlend(Action _action, Track _track, TickEvent _prevEvent, float _blendWeight)
 {
     if ((_action.GetGameObject(this.targetId) != null) && (_prevEvent != null))
     {
         if (this.enableTranslation)
         {
             if (this.cubic)
             {
                 this.CubicVectorBlend(_action, _track, _prevEvent, _blendWeight, true);
             }
             else
             {
                 _action.GetGameObject(this.targetId).transform.position = (Vector3)((this.GetTranslation(_action) * _blendWeight) + ((_prevEvent as ModifyTransform).GetTranslation(_action) * (1f - _blendWeight)));
             }
         }
         if (this.enableRotation)
         {
             _action.GetGameObject(this.targetId).transform.rotation = Quaternion.Slerp((_prevEvent as ModifyTransform).GetRotation(_action), this.GetRotation(_action), _blendWeight);
         }
         if (this.enableScaling)
         {
             if (this.cubic)
             {
                 this.CubicVectorBlend(_action, _track, _prevEvent, _blendWeight, false);
             }
             else
             {
                 _action.GetGameObject(this.targetId).transform.localScale = (Vector3)((this.scaling * _blendWeight) + ((_prevEvent as ModifyTransform).scaling * (1f - _blendWeight)));
             }
         }
     }
 }
        public override void Process(Action _action, Track _track)
        {
            Player hostPlayer = Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer();

            GameObject gameObject  = _action.GetGameObject(this.srcId);
            GameObject gameObject2 = _action.GetGameObject(this.destId);

            if (!gameObject && hostPlayer.Captain)
            {
                gameObject = hostPlayer.Captain.handle.gameObject;
            }
            if (gameObject)
            {
                if (this.MyPathIndicator == null)
                {
                    this.MyPathIndicator = Object.FindObjectOfType <PathIndicator>();
                }
                if (this.MyPathIndicator)
                {
                    if (this.bPlay)
                    {
                        this.MyPathIndicator.Play(gameObject, gameObject2, ref this.TargetPos);
                    }
                    else
                    {
                        this.MyPathIndicator.Stop();
                    }
                }
            }
            this.MyPathIndicator = null;
        }
 public int HasDependObject(Action _action)
 {
     if ((this.currentTranslation || this.currentRotation) || this.currentScaling)
     {
         return(1);
     }
     if (this.fromId >= 0)
     {
         if (_action.GetGameObject(this.fromId) != null)
         {
             return(1);
         }
         return(-1);
     }
     if (this.toId >= 0)
     {
         if (_action.GetGameObject(this.toId) != null)
         {
             return(1);
         }
         return(-1);
     }
     if (this.objectSpaceId < 0)
     {
         return(0);
     }
     if (_action.GetGameObject(this.objectSpaceId) != null)
     {
         return(1);
     }
     return(-1);
 }
Beispiel #9
0
 public override void Process(Action _action, Track _track)
 {
     if (_action.GetGameObject(this.cameraId) != null)
     {
         _action.GetGameObject(this.cameraId).transform.rotation = this.GetLookRotation(_action);
     }
 }
Beispiel #10
0
        private Quaternion GetLookRotation(Action _action)
        {
            GameObject gameObject = _action.GetGameObject(this.cameraId);

            if (gameObject == null)
            {
                return(Quaternion.identity);
            }
            GameObject gameObject2 = _action.GetGameObject(this.targetId);
            Vector3    a           = new Vector3(0f, 0f, 0f);

            if (gameObject2 == null)
            {
                a = this.localOffset + this.worldOffset;
            }
            else
            {
                a = gameObject2.transform.position + gameObject2.transform.TransformDirection(this.localOffset) + this.worldOffset;
            }
            Vector3 forward = a - gameObject.transform.position;

            if (this.UpDirType == CameraLookAt.EUpDirType.NoOverrideUp)
            {
                return(Quaternion.LookRotation(forward, gameObject.transform.up));
            }
            Quaternion rhs = Quaternion.AngleAxis(this.rowAngleByZ, Vector3.forward);
            Quaternion lhs = Quaternion.LookRotation(forward, Vector3.up);

            return(lhs * rhs);
        }
        public void CubicVectorBlend(Action _action, Track _track, TickEvent _prevEvent, float _blendWeight, bool isPos)
        {
            int indexOfEvent  = _track.GetIndexOfEvent(_prevEvent);
            int indexOfEvent2 = _track.GetIndexOfEvent(this);
            int eventsCount   = _track.GetEventsCount();
            int num           = indexOfEvent - 1;

            if (num < 0)
            {
                if (_action.loop)
                {
                    num = eventsCount - 1;
                    if (num < 0)
                    {
                        num = 0;
                    }
                }
                else
                {
                    num = 0;
                }
            }
            int num2 = indexOfEvent2 + 1;

            if (num2 >= eventsCount)
            {
                if (_action.loop)
                {
                    num2 = 0;
                }
                else
                {
                    num2 = indexOfEvent2;
                }
            }
            ModifyTransform modifyTransform  = _prevEvent as ModifyTransform;
            ModifyTransform modifyTransform2 = _track.GetEvent(num) as ModifyTransform;
            ModifyTransform modifyTransform3 = _track.GetEvent(num2) as ModifyTransform;

            DebugHelper.Assert(modifyTransform != null && modifyTransform2 != null && modifyTransform3 != null, "��һ�Ѷ���Ӧ��Ϊ��");
            Vector3 vector    = isPos ? modifyTransform.GetTranslation(_action) : modifyTransform.scaling;
            Vector3 vector2   = isPos ? this.GetTranslation(_action) : this.scaling;
            Vector3 formPoint = isPos ? modifyTransform2.GetTranslation(_action) : modifyTransform2.scaling;
            Vector3 lattPoint = isPos ? modifyTransform3.GetTranslation(_action) : modifyTransform3.scaling;
            Vector3 a;
            Vector3 a2;

            CurvlData.CalculateCtrlPoint(formPoint, vector, vector2, lattPoint, out a, out a2);
            float   d       = 1f - _blendWeight;
            Vector3 vector3 = vector * d * d * d + a * 3f * d * d * _blendWeight + a2 * 3f * d * _blendWeight * _blendWeight + vector2 * _blendWeight * _blendWeight * _blendWeight;

            if (isPos)
            {
                _action.GetGameObject(this.targetId).transform.position = vector3;
            }
            else
            {
                _action.GetGameObject(this.targetId).transform.localScale = vector3;
            }
        }
        private GameObject GetDestObj(Action _action)
        {
            GameObject gameObject = _action.GetGameObject(this.cameraId);

            if (this.cameraId2 != -1)
            {
                SLevelContext curLvelContext = Singleton <BattleLogic> .get_instance().GetCurLvelContext();

                if (curLvelContext != null && curLvelContext.m_isCameraFlip)
                {
                    gameObject = _action.GetGameObject(this.cameraId2);
                }
            }
            return(gameObject);
        }
Beispiel #13
0
        public override void Process(Action _action, Track _track)
        {
            Vector3    targetPos  = this.TargetPos;
            GameObject gameObject = _action.GetGameObject(this.destId);

            if (gameObject != null)
            {
                targetPos = gameObject.transform.position;
            }
            Player hostPlayer = Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer();

            PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.srcId);

            if ((actorHandle == 0) || ((hostPlayer.Captain != 0) && (actorHandle == hostPlayer.Captain)))
            {
                if (hostPlayer.Captain.handle.ActorControl != null)
                {
                    FrameCommandFactory.CreateFrameCommand <StopMoveCommand>().Send();
                    FrameCommand <MoveToPosCommand> command2 = FrameCommandFactory.CreateFrameCommand <MoveToPosCommand>();
                    command2.playerID             = hostPlayer.PlayerId;
                    command2.cmdData.destPosition = (VInt3)targetPos;
                    command2.Send();
                }
            }
            else if (actorHandle != 0)
            {
                actorHandle.handle.ActorControl.RealMovePosition((VInt3)targetPos, 0);
            }
        }
        public override void Leave(Action _action, Track _track)
        {
            if (this.particleObj != null)
            {
                this.particleObj.transform.parent = null;
                ActionManager.DestroyGameObject(this.particleObj);
            }
            GameObject gameObject = _action.GetGameObject(this.targetId);

            if ((this.targetId >= 0) && (gameObject != null))
            {
                if (this.applyActionSpeedToAnimation)
                {
                    _action.RemoveTempObject(Action.PlaySpeedAffectedType.ePSAT_Anim, gameObject);
                }
                if (this.applyActionSpeedToParticle)
                {
                    _action.RemoveTempObject(Action.PlaySpeedAffectedType.ePSAT_Fx, gameObject);
                }
                this.RemoveEye();
                ActorHelper.DetachActorRoot(gameObject);
                ActionManager.DestroyGameObjectFromAction(_action, gameObject);
            }
            if (this.actorSlot != null)
            {
                PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.parentId);
                if (actorHandle != 0)
                {
                    actorHandle.handle.RemoveActorRootSlot(this.actorSlot);
                }
            }
            this.actorSlot = null;
        }
        public override void PostProcess(Action _action, Track _track, int _localTime)
        {
            GameObject gameObject = _action.GetGameObject(this.targetId);

            if (gameObject == null)
            {
                return;
            }
            GameObject gameObject2 = gameObject;

            if (this.GetAnimation(gameObject) == null)
            {
                PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.targetId);
                if (actorHandle)
                {
                    gameObject2 = actorHandle.get_handle().ActorMesh;
                }
                else
                {
                    gameObject2 = null;
                }
            }
            if (gameObject2 == null)
            {
                return;
            }
            Animation      animation      = this.GetAnimation(gameObject2);
            AnimationState animationState = animation[this.clipName];

            if (animationState == null)
            {
                return;
            }
            animationState.speed = this.playSpeed * ((!this.applyActionSpeed) ? 1f : _action.playSpeed.get_single());
        }
        public override void Leave(Action _action, Track _track)
        {
            if (!this.enterShaking)
            {
                return;
            }
            if (this.useMainCamera && Camera.main)
            {
                this.targetObject = Camera.main.gameObject;
            }
            else
            {
                this.targetObject = _action.GetGameObject(this.targetId);
            }
            if (this.targetObject == null || this.targetObject.transform == null)
            {
                this.enterShaking = false;
                if (ActionManager.Instance.isPrintLog)
                {
                }
                return;
            }
            this.shock = Vector3.zero;
            if (this.useAccumOffset)
            {
                this.targetObject.transform.localPosition -= this.lastOffset;
            }
            else
            {
                this.targetObject.transform.localPosition = this.originPos;
            }
            Singleton <BattleLogic> .GetInstance().IsModifyingCamera = false;

            this.enterShaking = false;
        }
        public override void PostProcess(Action _action, Track _track, int _localTime)
        {
            GameObject gameObject = _action.GetGameObject(this.targetId);

            if (gameObject != null)
            {
                GameObject actorMesh = gameObject;
                if (this.GetAnimation(gameObject) == null)
                {
                    PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.targetId);
                    if (actorHandle != 0)
                    {
                        actorMesh = actorHandle.handle.ActorMesh;
                    }
                    else
                    {
                        actorMesh = null;
                    }
                }
                if (actorMesh != null)
                {
                    AnimationState state = this.GetAnimation(actorMesh)[this.clipName];
                    if (state != null)
                    {
                        state.speed = this.playSpeed * (!this.applyActionSpeed ? 1f : _action.playSpeed.single);
                    }
                }
            }
        }
        public override void ProcessBlend(Action _action, Track _track, TickEvent _prevEvent, float _blendWeight)
        {
            GameObject gameObject = _action.GetGameObject(this.targetId);

            if (gameObject != null)
            {
                GameObject actorMesh = gameObject;
                if (this.GetAnimation(gameObject) == null)
                {
                    PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.targetId);
                    if (actorHandle != 0)
                    {
                        actorMesh = actorHandle.handle.ActorMesh;
                    }
                    else
                    {
                        actorMesh = null;
                    }
                }
                if ((actorMesh != null) && (_prevEvent != null))
                {
                    AnimationState state = this.GetAnimation(actorMesh)[this.clipName];
                    if (state != null)
                    {
                        state.speed = this.playSpeed * (!this.applyActionSpeed ? 1f : _action.playSpeed.single);
                    }
                }
            }
        }
        public override void Process(Action _action, Track _track)
        {
            List <GameObject> list = new List <GameObject>();

            foreach (int num in this.gameObjectIds)
            {
                list.Add(_action.GetGameObject(num));
            }
            ListView <Action> view = new ListView <Action>();

            foreach (GameObject obj2 in list)
            {
                foreach (Action action in ActionManager.Instance.objectReferenceSet[obj2])
                {
                    if ((action != _action) && !action.unstoppable)
                    {
                        view.Add(action);
                    }
                }
            }
            foreach (Action action2 in view)
            {
                action2.Stop(false);
            }
        }
Beispiel #20
0
        public override void Process(Action _action, Track _track)
        {
            GameObject gameObject = _action.GetGameObject(this.targetId);

            if (gameObject == null)
            {
                Debug.LogWarning("not find setting layer/tag target object");
                return;
            }
            if (this.enableLayer)
            {
                gameObject.layer = this.layer;
                Transform[] componentsInChildren = gameObject.GetComponentsInChildren <Transform>();
                for (int i = 0; i < componentsInChildren.Length; i++)
                {
                    componentsInChildren[i].gameObject.layer = this.layer;
                }
            }
            if (this.enableTag)
            {
                gameObject.tag = this.tag;
                Transform[] componentsInChildren2 = gameObject.GetComponentsInChildren <Transform>();
                for (int j = 0; j < componentsInChildren2.Length; j++)
                {
                    componentsInChildren2[j].gameObject.tag = this.tag;
                }
            }
        }
        public override void Process(Action _action, Track _track)
        {
            List <GameObject> list = new List <GameObject>();

            int[] array = this.gameObjectIds;
            for (int i = 0; i < array.Length; i++)
            {
                int index = array[i];
                list.Add(_action.GetGameObject(index));
            }
            ListView <Action> listView = new ListView <Action>();

            using (List <GameObject> .Enumerator enumerator = list.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    GameObject current = enumerator.get_Current();
                    foreach (Action current2 in ActionManager.Instance.objectReferenceSet[current])
                    {
                        if (current2 != _action && !current2.unstoppable)
                        {
                            listView.Add(current2);
                        }
                    }
                }
            }
            foreach (Action current3 in listView)
            {
                current3.Stop(false);
            }
        }
        public override void Process(Action _action, Track _track, int _localTime)
        {
            if (!this.enterShaking)
            {
                return;
            }
            if (this.useMainCamera && Camera.main)
            {
                this.targetObject = Camera.main.gameObject;
            }
            else
            {
                this.targetObject = _action.GetGameObject(this.targetId);
            }
            if (this.targetObject == null || this.targetObject.transform == null)
            {
                if (ActionManager.Instance.isPrintLog)
                {
                }
                return;
            }
            Vector3 a = new Vector3(Random.Range(-this.shock.x, this.shock.x), Random.Range(-this.shock.y, this.shock.y), Random.Range(-this.shock.z, this.shock.z));

            if (this.useAccumOffset)
            {
                this.targetObject.transform.localPosition += a - this.lastOffset;
                this.lastOffset = a;
            }
            else
            {
                this.targetObject.transform.localPosition = a + this.originPos;
            }
            this.shock *= 1f - this.recovery;
        }
Beispiel #23
0
        public override void Process(Action _action, Track _track)
        {
            GameObject gameObject = _action.GetGameObject(this.targetId);
            PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.targetId);

            Singleton <CSoundManager> .instance.PlayBattleSound(this.eventName, actorHandle, gameObject);
        }
 public override void Leave(Action _action, Track _track)
 {
     if (this.targetId >= 0 && _action.GetGameObject(this.targetId))
     {
         _action.SetGameObject(this.targetId, null);
     }
 }
        public override void Process(Action _action, Track _track)
        {
            Vector3    vector     = this.TargetPos;
            GameObject gameObject = _action.GetGameObject(this.destId);

            if (gameObject != null)
            {
                vector = gameObject.transform.position;
            }
            Player hostPlayer = Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer();

            PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.srcId);

            if (!actorHandle || (hostPlayer.Captain && actorHandle == hostPlayer.Captain))
            {
                ObjWrapper actorControl = hostPlayer.Captain.get_handle().ActorControl;
                if (actorControl != null)
                {
                    FrameCommandFactory.CreateFrameCommand <StopMoveCommand>().Send();
                    FrameCommand <MoveToPosCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <MoveToPosCommand>();
                    frameCommand.cmdData.destPosition = (VInt3)vector;
                    frameCommand.Send();
                }
            }
            else if (actorHandle)
            {
                actorHandle.get_handle().ActorControl.RealMovePosition((VInt3)vector, 0u);
            }
        }
Beispiel #26
0
        public override void Leave(Action _action, Track _track)
        {
            GameObject gameObject = _action.GetGameObject(this.targetId);

            if (gameObject == null || this.length == 0)
            {
                return;
            }
            PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.targetId);
            Animation animation;

            if (actorHandle)
            {
                animation = actorHandle.get_handle().ActorMeshAnimation;
            }
            else
            {
                GameObject obj = gameObject;
                animation = this.GetAnimation(obj);
            }
            if (animation == null)
            {
                return;
            }
            if (actorHandle)
            {
                actorHandle.get_handle().AnimControl.Stop(this.clipName, this.playNextAnim);
            }
            else
            {
                animation[this.clipName].enabled = false;
            }
        }
Beispiel #27
0
        public override void Enter(Action _action, Track _track)
        {
            if (!Singleton <BattleLogic> .GetInstance().IsModifyingCamera&& this.ShouldShake(_action))
            {
                if (this.useMainCamera && (Camera.main != null))
                {
                    this.targetObject = Camera.main.gameObject;
                }
                else
                {
                    this.targetObject = _action.GetGameObject(this.targetId);
                }
                if ((this.targetObject == null) || (this.targetObject.transform == null))
                {
                    if (ActionManager.Instance.isPrintLog)
                    {
                    }
                }
                else
                {
                    Singleton <BattleLogic> .GetInstance().IsModifyingCamera = true;

                    this.enterShaking = true;
                    this.originPos    = this.targetObject.transform.localPosition;
                    this.shock        = this.shakeRange;
                }
            }
        }
Beispiel #28
0
        public override void Leave(Action _action, Track _track)
        {
            GameObject gameObject = _action.GetGameObject(this.targetId);

            if ((gameObject != null) && (base.length != 0))
            {
                GameObject actorMesh = gameObject;
                PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.targetId);
                if (this.GetAnimation(gameObject) == null)
                {
                    if (actorHandle != 0)
                    {
                        actorMesh = actorHandle.handle.ActorMesh;
                    }
                    else
                    {
                        actorMesh = null;
                    }
                }
                if (actorMesh != null)
                {
                    if (actorHandle != 0)
                    {
                        actorHandle.handle.AnimControl.Stop(this.clipName, this.playNextAnim);
                    }
                    else
                    {
                        this.GetAnimation(actorMesh)[this.clipName].enabled = false;
                    }
                }
            }
        }
Beispiel #29
0
        public override bool Check(Action _action, Track _track)
        {
            GameObject gameObject = _action.GetGameObject(this.targetId);

            if (gameObject == null)
            {
                return(false);
            }
            Component component = gameObject.GetComponent(this.scriptName);

            if (component == null)
            {
                return(false);
            }
            Type type = component.GetType();

            object[]          array = new object[0];
            List <GameObject> list  = type.InvokeMember(this.methodName, 318, null, component, array) as List <GameObject>;

            if (this.tags.Length > 0)
            {
                using (List <GameObject> .Enumerator enumerator = list.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        GameObject current = enumerator.get_Current();
                        if (!(current == null))
                        {
                            string[] array2 = this.tags;
                            for (int i = 0; i < array2.Length; i++)
                            {
                                string text = array2[i];
                                if (current.tag == text)
                                {
                                    bool result = true;
                                    return(result);
                                }
                            }
                        }
                    }
                }
            }
            else
            {
                using (List <GameObject> .Enumerator enumerator2 = list.GetEnumerator())
                {
                    while (enumerator2.MoveNext())
                    {
                        GameObject current2 = enumerator2.get_Current();
                        if (current2 != null)
                        {
                            bool result = true;
                            return(result);
                        }
                    }
                }
            }
            return(false);
        }
Beispiel #30
0
 public override void Process(Action _action, Track _track)
 {
     GameObject gameObject = _action.GetGameObject(this.targetId);
     if (gameObject != null)
     {
         gameObject.SetActive(this.enabled);
     }
 }