Example #1
0
 public override void Leave(AGE.Action _action, Track _track)
 {
     if (this.actor_ != 0)
     {
         if (this.IgnoreCollision)
         {
             bool flag = false;
             _action.refParams.GetRefParam("_HitTargetHero", ref flag);
             if (!flag)
             {
                 this.SetFinalPos();
             }
             else
             {
                 VInt3 zero = VInt3.zero;
                 _action.refParams.GetRefParam("_HitTargetHeroPos", ref zero);
                 if (!PathfindingUtility.IsValidTarget((ActorRoot)this.actor_, zero))
                 {
                     this.SetFinalPos();
                 }
                 else
                 {
                     this.actor_.handle.location = zero;
                 }
             }
         }
         this.actor_.handle.ObjLinker.RmvCustomMoveLerp(new CustomMoveLerpFunc(this.ActionMoveLerp));
         this.actor_.handle.ActorControl.RmvNoAbilityFlag(ObjAbilityType.ObjAbility_Move);
         this.done_ = true;
     }
 }
Example #2
0
 public override void Process(AGE.Action _action, Track _track, int _localTime)
 {
     base.Process(_action, _track, _localTime);
     if (this.bInit || !this.bDone)
     {
         if ((this.srcActor == 0) || (this.targetActor == 0))
         {
             this.bDone = true;
             this.HideBeam();
         }
         else
         {
             VInt3 location = this.srcActor.handle.location;
             VInt3 num4     = this.targetActor.handle.location - location;
             int   num3     = num4.magnitude2D;
             if (num3 > 0)
             {
                 this.SetBeamLength(num3);
                 this.RenderBeam();
             }
             if (this.srcActor.handle.ActorControl.IsDeadState || this.targetActor.handle.ActorControl.IsDeadState)
             {
                 this.bDone = true;
                 this.HideBeam();
             }
         }
     }
 }
Example #3
0
        public override void Process(AGE.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.cmdData.destPosition = (VInt3)targetPos;
                    command2.Send();
                }
            }
            else if (actorHandle != 0)
            {
                actorHandle.handle.ActorControl.RealMovePosition((VInt3)targetPos, 0);
            }
        }
Example #4
0
        public override void Process(AGE.Action _action, Track _track)
        {
            Player hostPlayer = Singleton <GamePlayerCenter> .GetInstance().GetHostPlayer();

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

            if ((gameObject == null) && (hostPlayer.Captain != 0))
            {
                gameObject = hostPlayer.Captain.handle.gameObject;
            }
            if (gameObject != null)
            {
                if (this.MyPathIndicator == null)
                {
                    this.MyPathIndicator = UnityEngine.Object.FindObjectOfType <PathIndicator>();
                }
                if (this.MyPathIndicator != null)
                {
                    if (this.bPlay)
                    {
                        this.MyPathIndicator.Play(gameObject, inDest, ref this.TargetPos);
                    }
                    else
                    {
                        this.MyPathIndicator.Stop();
                    }
                }
            }
            this.MyPathIndicator = null;
        }
Example #5
0
        public override void Enter(AGE.Action _action, Track _track)
        {
            this.actor_ = _action.GetActorHandle(this.targetId);
            if (this.actor_ != 0)
            {
                MaterialHurtEffect matHurtEffect = this.actor_.handle.MatHurtEffect;
                if (matHurtEffect == null)
                {
                    this.actor_.Release();
                }
                else
                {
                    switch (this.effectType)
                    {
                    case MaterialEffectType.Freeze:
                        this.playingId = matHurtEffect.PlayFreezeEffect();
                        break;

                    case MaterialEffectType.Stone:
                        this.playingId = matHurtEffect.PlayStoneEffect();
                        break;

                    case MaterialEffectType.Translucent:
                        matHurtEffect.SetTranslucent(true);
                        break;

                    case MaterialEffectType.HighLit:
                        matHurtEffect.PlayHighLitEffect(this.highLitColor);
                        break;
                    }
                }
            }
        }
Example #6
0
 public override void Enter(AGE.Action _action, Track _track)
 {
     base.Enter(_action, _track);
     if (this.BubbleTextId > 0)
     {
         this.actorRootList = new List <PoolObjHandle <ActorRoot> >();
         PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.srcId);
         PoolObjHandle <ActorRoot> item        = _action.GetActorHandle(this.targetId);
         if (actorHandle != 0)
         {
             this.actorRootList.Add(actorHandle);
         }
         if (item != 0)
         {
             this.actorRootList.Add(item);
         }
         if (this.PlayerCamp == COM_PLAYERCAMP.COM_PLAYERCAMP_COUNT)
         {
             this.AddActorRootList(COM_PLAYERCAMP.COM_PLAYERCAMP_1);
             this.AddActorRootList(COM_PLAYERCAMP.COM_PLAYERCAMP_2);
         }
         else
         {
             this.AddActorRootList(this.PlayerCamp);
         }
         List <PoolObjHandle <ActorRoot> > .Enumerator enumerator = this.actorRootList.GetEnumerator();
         while (enumerator.MoveNext())
         {
             this.SetHudText(Utility.GetBubbleText((uint)this.BubbleTextId), enumerator.Current);
         }
     }
 }
Example #7
0
        private void SpawnBullet(AGE.Action _action)
        {
            SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext");

            for (int i = 0; i < this.spawnMax; i++)
            {
                int   index = 0;
                VInt3 zero  = VInt3.zero;
                if (this.transArray.Length < 0)
                {
                    zero = VInt3.zero;
                }
                else
                {
                    if (this.bRandom)
                    {
                        index = FrameRandom.Random((uint)this.transArray.Length);
                    }
                    else
                    {
                        index = i % this.transArray.Length;
                    }
                    zero = this.transArray[index];
                }
                refParamObject.BulletPos = zero;
                PoolObjHandle <BulletSkill> handle = this.skillControl.SpawnBullet(refParamObject, this.ActionName, this.bDeadRemove, this.bAgeImmeExcute);
            }
        }
Example #8
0
 public void Process(AGE.Action _action, Track _track, int _localTime)
 {
     if (this.attackActor != 0)
     {
         this.hit       = false;
         this.localTime = _localTime;
         if (this.bFirstProcess)
         {
             this.bFirstProcess = false;
             this.HitTrigger(_action);
         }
         else
         {
             this.deltaTime += _localTime - this.lastTime;
             if (this.deltaTime >= this.triggerInterval)
             {
                 this.HitTrigger(_action);
                 this.deltaTime -= this.triggerInterval;
             }
         }
         this.lastTime = _localTime;
         _action.refParams.SetRefParam("_HitTargetHero", this.bHitTargetHero);
         if (this.bHitTargetHero)
         {
             _action.refParams.SetRefParam("_HitTargetHeroPos", this.HitTargetHeroPos);
         }
     }
 }
Example #9
0
        public override void Process(AGE.Action _action, Track _track)
        {
            PoolObjHandle <ActorRoot> handle;

            base.Process(_action, _track);
            switch (this.ActorType)
            {
            case enActorType.All:
                handle = this.GetActor(Singleton <GameObjMgr> .GetInstance().GameActors, this.configId, this.index);
                break;

            case enActorType.Hero:
                handle = this.GetActor(Singleton <GameObjMgr> .GetInstance().HeroActors, this.configId, this.index);
                break;

            case enActorType.Soldier:
                handle = this.GetActor(Singleton <GameObjMgr> .GetInstance().SoldierActors, this.configId, this.index);
                break;

            default:
                handle = new PoolObjHandle <ActorRoot>();
                break;
            }
            Singleton <BattleSkillHudControl> .GetInstance().AddHighlightForActor(handle, this.bPauseGame);
        }
Example #10
0
        public override void Process(AGE.Action _action, Track _track)
        {
            PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.targetId);

            if (actorHandle == 0)
            {
                if (ActionManager.Instance.isPrintLog)
                {
                }
            }
            else
            {
                if (this.bImmediateRevive)
                {
                    this.bCheckFilter = actorHandle.handle.ActorControl.IsEnableReviveContext();
                }
                else if (!this.bOnlySelf)
                {
                    this.FilterActorType(actorHandle);
                    this.FilterActorCamp(actorHandle);
                }
                else
                {
                    SkillUseContext refParamObject = _action.refParams.GetRefParamObject <SkillUseContext>("SkillContext");
                    if (((refParamObject == null) || (refParamObject.Originator == 0)) || (refParamObject.Originator.handle.ActorControl == null))
                    {
                        object[] inParameters = new object[] { _action.name };
                        DebugHelper.Assert(false, "Failed find orignal actor of this skill. action:{0}", inParameters);
                        return;
                    }
                    this.bCheckFilter = refParamObject.Originator == actorHandle;
                }
                base.Process(_action, _track);
            }
        }
Example #11
0
        public override void Enter(AGE.Action _action, Track _track)
        {
            base.Enter(_action, _track);
            this.actorObj = _action.GetActorHandle(this.targetId);
            PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.attackId);

            if ((this.actorObj != 0) && (actorHandle != 0))
            {
                ObjWrapper actorControl = this.actorObj.handle.ActorControl;
                if ((actorControl != null) && !actorControl.IsDeadState)
                {
                    actorControl.TerminateMove();
                    actorControl.ClearMoveCommand();
                    actorControl.ForceAbortCurUseSkill();
                    actorControl.SetOutOfControl(true, (OutOfControlType)this.subType);
                    switch (this.subType)
                    {
                    case 0:
                        actorControl.SetTauntTarget(actorHandle);
                        break;

                    case 2:
                        actorControl.SetTerrorActor(actorHandle);
                        break;
                    }
                }
            }
        }
Example #12
0
 public override void Process(AGE.Action _action, Track _track)
 {
     this.actor = _action.GetActorHandle(this.targetId);
     if (this.actor == 0)
     {
         if (ActionManager.Instance.isPrintLog)
         {
         }
     }
     else
     {
         ActorRoot handle = this.actor.handle;
         if (this.type == ColliderType.Box)
         {
             VCollisionBox collisionShape = GetCollisionShape <VCollisionBox>(handle, CollisionShapeType.Box);
             collisionShape.Pos   = this.Pos;
             collisionShape.Size  = this.Size;
             collisionShape.dirty = true;
             collisionShape.ConditionalUpdateShape();
         }
         else if (this.type == ColliderType.Sphere)
         {
             VCollisionSphere sphere = GetCollisionShape <VCollisionSphere>(handle, CollisionShapeType.Sphere);
             sphere.Pos    = this.Pos;
             sphere.Radius = this.Radius;
             sphere.dirty  = true;
             sphere.ConditionalUpdateShape();
         }
     }
 }
Example #13
0
        public override void Enter(AGE.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;
                }
            }
        }
Example #14
0
 public override void Process(AGE.Action _action, Track _track)
 {
     if (Singleton <BattleLogic> .GetInstance().mapLogic != null)
     {
         Singleton <BattleLogic> .GetInstance().mapLogic.ResetSoldierRegion();
     }
 }
Example #15
0
        public override void Process(AGE.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);
        }
Example #16
0
 public override void Process(AGE.Action _action, Track _track, int _localTime)
 {
     if (!this.switchFinished && (this.curCamera != null))
     {
         if (_localTime >= this.slerpTick)
         {
             if (this.isMoba_camera)
             {
                 this.curCamera.transform.position = this.curCamera.transform.parent.position;
                 this.curCamera.transform.rotation = this.curCamera.transform.parent.rotation;
             }
             else
             {
                 this.curCamera.transform.position = this.destPos;
                 this.curCamera.transform.rotation = this.destRot;
             }
             this.switchFinished = true;
         }
         else if (this.isMoba_camera)
         {
             this.curCamera.transform.position = Vector3.Lerp(this.startPos, this.curCamera.transform.parent.position, ((float)_localTime) / ((float)this.slerpTick));
             this.curCamera.transform.rotation = Quaternion.Slerp(this.startRot, this.curCamera.transform.parent.rotation, ((float)_localTime) / ((float)this.slerpTick));
         }
         else
         {
             this.curCamera.transform.position = Vector3.Lerp(this.startPos, this.destPos, ((float)_localTime) / ((float)this.slerpTick));
             this.curCamera.transform.rotation = Quaternion.Slerp(this.startRot, this.destRot, ((float)_localTime) / ((float)this.slerpTick));
         }
         base.Process(_action, _track, _localTime);
     }
 }
Example #17
0
 public override void Enter(AGE.Action _action, Track _track)
 {
     base.Enter(_action, _track);
     this.actorObj = _action.GetActorHandle(this.targetId);
     this.SetMeshScale(this.scaleRate);
     this.SetCollisionScale(this.scaleRate);
 }
Example #18
0
 public override void OnRelease()
 {
     this.playSpeedOnPause    = VFactor.zero;
     this.deltaTime           = 0;
     this.started_            = false;
     this.nextDestroy         = false;
     this.enabled             = true;
     this.name                = string.Empty;
     this.length              = 0x1388;
     this.loop                = false;
     this.playSpeed           = VFactor.one;
     this.unstoppable         = false;
     this.actionName          = string.Empty;
     this.refGameObjectsCount = -1;
     this.time                = 0;
     this.parentAction        = null;
     this.actorHandles.Clear();
     this.gameObjects.Clear();
     this.tracks.Clear();
     this.conditions.Clear();
     this.conditionChanged = true;
     this.refParams.Reset();
     this.refParamsSrc = null;
     this.templateObjectIds.Clear();
     this.tempObjsAffectedByPlaySpeed.Clear();
     this.onActionStop = (ActionStopDelegate)Delegate.RemoveAll(this.onActionStop, this.onActionStop);
 }
Example #19
0
        public override void Process(AGE.Action _action, Track _track)
        {
            GameObject obj2 = (Singleton <CBattleSystem> .GetInstance().FightFormScript == null) ? null : Singleton <CBattleSystem> .GetInstance().FightFormScript.gameObject;

            if (obj2 != null)
            {
                GameObject        gameObject = obj2.transform.FindChild("Joystick").gameObject;
                bool              bActive    = !this.bForbid;
                CUIJoystickScript component  = gameObject.GetComponent <CUIJoystickScript>();
                if (component != null)
                {
                    component.ResetAxis();
                }
                gameObject.CustomSetActive(bActive);
                component = gameObject.GetComponent <CUIJoystickScript>();
                if (component != null)
                {
                    component.ResetAxis();
                }
                if ((this.bForbid && (Singleton <CBattleSystem> .GetInstance().FightForm != null)) && (Singleton <CBattleSystem> .GetInstance().FightForm.m_skillButtonManager != null))
                {
                    for (int i = 0; i < 5; i++)
                    {
                        Vector2 screenPosition = new Vector2();
                        Singleton <CBattleSystem> .GetInstance().FightForm.m_skillButtonManager.SkillButtonUp(Singleton <CBattleSystem> .GetInstance().FightFormScript, (SkillSlotType)i, false, screenPosition);
                    }
                }
            }
        }
Example #20
0
        public Quaternion GetRotation(AGE.Action _action)
        {
            if (_action.GetGameObject(this.targetId) != null)
            {
                this.SetCurrentTransform(_action.GetGameObject(this.targetId).transform);
            }
            GameObject gameObject = _action.GetGameObject(this.fromId);
            GameObject obj3       = _action.GetGameObject(this.toId);

            if ((gameObject != null) && (obj3 != null))
            {
                Vector3 vector = obj3.transform.position - gameObject.transform.position;
                return(Quaternion.LookRotation(Vector3.Normalize(new Vector3(vector.x * axisWeight.x, vector.y * axisWeight.y, vector.z * axisWeight.z)), Vector3.up) * this.rotation);
            }
            GameObject obj4 = _action.GetGameObject(this.objectSpaceId);

            if (obj4 != null)
            {
                return(obj4.transform.rotation * this.rotation);
            }
            GameObject obj5 = _action.GetGameObject(this.targetId);

            if ((obj5 != null) && (obj5.transform.parent != null))
            {
                return(obj5.transform.parent.rotation * this.rotation);
            }
            return(this.rotation);
        }
Example #21
0
        public override void Enter(AGE.Action _action, Track _track)
        {
            PoolObjHandle <ActorRoot> actorHandle = _action.GetActorHandle(this.targetId);

            if (actorHandle == 0)
            {
                if (ActionManager.Instance.isPrintLog)
                {
                }
            }
            else
            {
                this.skillControl = actorHandle.handle.SkillControl;
                if (this.skillControl == null)
                {
                    if (ActionManager.Instance.isPrintLog)
                    {
                    }
                }
                else
                {
                    this.SpawnBullet(_action);
                }
            }
        }
Example #22
0
 public int HasDependObject(AGE.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);
 }
Example #23
0
        public override void Leave(AGE.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;
                    }
                }
            }
        }
Example #24
0
 public override void ProcessBlend(AGE.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)));
             }
         }
     }
 }
Example #25
0
        public override void Leave(AGE.Action _action, Track _track)
        {
            if (this.actor_ != 0)
            {
                MaterialHurtEffect matHurtEffect = this.actor_.handle.MatHurtEffect;
                if (matHurtEffect != null)
                {
                    switch (this.effectType)
                    {
                    case MaterialEffectType.Freeze:
                        matHurtEffect.StopFreezeEffect(this.playingId);
                        break;

                    case MaterialEffectType.Stone:
                        matHurtEffect.StopStoneEffect(this.playingId);
                        break;

                    case MaterialEffectType.Translucent:
                        matHurtEffect.SetTranslucent(false);
                        break;

                    case MaterialEffectType.HighLit:
                        matHurtEffect.StopHighLitEffect();
                        break;
                    }
                }
            }
        }
 public override void Process(AGE.Action _action, Track _track)
 {
     base.Process(_action, _track);
     if (this.NewbieTriggerType > 0)
     {
         if (this.bCurrentGuideOver)
         {
             if (this.bWeakGuide)
             {
                 MonoSingleton <NewbieGuideManager> .GetInstance().ForceCompleteWeakGuide();
             }
             else
             {
                 MonoSingleton <NewbieGuideManager> .GetInstance().ForceCompleteNewbieGuide();
             }
         }
         else if (this.bWeakGuide)
         {
             MonoSingleton <NewbieGuideManager> .GetInstance().CheckWeakGuideTrigger((NewbieGuideWeakGuideType)this.NewbieTriggerType, new uint[0]);
         }
         else
         {
             MonoSingleton <NewbieGuideManager> .GetInstance().CheckTriggerTime((NewbieGuideTriggerTimeType)this.NewbieTriggerType, new uint[0]);
         }
     }
 }
Example #27
0
        private bool Init(AGE.Action _action)
        {
            this.srcActor    = _action.GetActorHandle(this.sourceId);
            this.targetActor = _action.GetActorHandle(this.targetId);
            if ((this.srcActor == 0) || (this.targetActor == 0))
            {
                return(false);
            }
            Vector3    srcPosition = this.GetSrcPosition();
            Quaternion rot         = Quaternion.LookRotation((Vector3)this.targetActor.handle.forward);
            bool       isInit      = false;

            this.beamObject = MonoSingleton <SceneMgr> .GetInstance().GetPooledGameObjLOD(this.resourceName, true, SceneObjType.ActionRes, srcPosition, rot, out isInit);

            if (this.beamObject == null)
            {
                return(false);
            }
            this.lineRenderer = this.beamObject.gameObject.GetComponentInChildren <LineRenderer>();
            if (this.lineRenderer == null)
            {
                return(false);
            }
            this.lineRenderer.SetWidth(this.beamWidth, this.beamWidth);
            return(true);
        }
Example #28
0
        public override void Leave(AGE.Action _action, Track _track)
        {
            GameObject gameObject = _action.GetGameObject(this.srcId);
            GameObject obj3       = _action.GetGameObject(this.atkerId);

            base.Leave(_action, _track);
        }
Example #29
0
        public override void Process(AGE.Action _action, Track _track)
        {
            GameObject gameObject = _action.GetGameObject(this.targetId);

            if (gameObject == null)
            {
                Debug.LogWarning("not find setting layer/tag target object");
            }
            else
            {
                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[] transformArray2 = gameObject.GetComponentsInChildren <Transform>();
                    for (int j = 0; j < transformArray2.Length; j++)
                    {
                        transformArray2[j].gameObject.tag = this.tag;
                    }
                }
            }
        }
Example #30
0
        public override void Process(AGE.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);
            }
        }