Exemplo n.º 1
0
        public IEnumerator PlayRangedActionAnimation(Direction directionToAttack)
        {
            if (!m_characterData.hasRangedAttackAnimations)
            {
                yield return(PlayActionAnimation(directionToAttack, waitForAnimationEndOnMissingLabel: true));

                yield break;
            }
            CharacterAnimationInfo rangedAttackAnimationInfo = new CharacterAnimationInfo(Vector2Int.op_Implicit(m_cellObject.coords), "rangedattack", "rangedattack", loops: false, directionToAttack, m_mapRotation);

            StartFightAnimation(rangedAttackAnimationInfo, (Action)((CharacterObject)this).PlayIdleAnimation, (Action)null, restart: true, async: false);
            Animator2D animator = m_animator2D;
            int        num      = default(int);

            if (animator.CurrentAnimationHasLabel("shot", ref num))
            {
                while (!CharacterObjectUtility.HasAnimationReachedLabel(animator, rangedAttackAnimationInfo, "shot"))
                {
                    yield return(null);
                }
            }
            else
            {
                Log.Warning(animator.GetDefinition().get_name() + " is missing the 'shot' label in the animation named '" + rangedAttackAnimationInfo.animationName + "'.", 512, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Maps\\Objects\\FightCharacterObject.cs");
            }
        }
        public IEnumerator PlayActivationAnimation()
        {
            Animator2D animator = m_animator2D;

            if (!m_characterData.hasActivationAnimation)
            {
                Log.Warning(animator.GetDefinition().get_name() + " does not have an activation animation.", 204, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Maps\\Objects\\ObjectMechanismObject.cs");
                yield break;
            }
            CharacterAnimationInfo activationAnimationInfo = new CharacterAnimationInfo(Vector2Int.op_Implicit(m_cellObject.coords), "attack", "attack", loops: false, direction, m_mapRotation);

            StartFightAnimation(activationAnimationInfo, (Action)((CharacterObject)this).PlayIdleAnimation, (Action)null, restart: true, async: false);
            while (!CharacterObjectUtility.HasAnimationReachedLabel(animator, activationAnimationInfo, "shot"))
            {
                yield return(null);
            }
            TriggerActivationEffect();
        }
Exemplo n.º 3
0
        public IEnumerator Die()
        {
            PlayAnimation(deathAnimation);
            int num = default(int);

            if (m_animator2D.CurrentAnimationHasLabel("die", ref num))
            {
                while (!HasAnimationReachedLabel(m_animator2D, deathAnimation, "die"))
                {
                    yield return(null);
                }
                m_animator2D.set_paused(true);
            }
            else
            {
                Log.Warning(m_animator2D.GetDefinition().get_name() + " is missing the 'die' label in the animation named '" + deathAnimation + "'.", 151, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Maps\\Objects\\BossObject.cs");
            }
        }
Exemplo n.º 4
0
 public void FollowPath(List <Vector3> path, Vector3 endLookAt)
 {
     //IL_0036: Unknown result type (might be due to invalid IL or missing references)
     if (!(m_animator2D.GetDefinition() == null))
     {
         if (m_movementCoroutine != null)
         {
             this.StopCoroutine(m_movementCoroutine);
         }
         if (path == null)
         {
             PlayIdleAnimation();
         }
         else
         {
             m_movementCoroutine = this.StartCoroutine(MoveToRoutine(path, endLookAt));
         }
     }
 }
        protected override IEnumerator PlayDeathAnimation()
        {
            CharacterAnimationInfo deathAnimationInfo = new CharacterAnimationInfo(Vector2Int.op_Implicit(m_cellObject.coords), "hit", "death", loops: false, direction, m_mapRotation);

            StartFightAnimation(deathAnimationInfo, null, null, restart: false);
            Animator2D animator = m_animator2D;
            int        num      = default(int);

            if (animator.CurrentAnimationHasLabel("die", ref num))
            {
                while (!CharacterObjectUtility.HasAnimationReachedLabel(animator, deathAnimationInfo, "die"))
                {
                    yield return(null);
                }
                animator.set_paused(true);
            }
            else
            {
                Log.Warning(animator.GetDefinition().get_name() + " is missing the 'die' label in the animation named '" + deathAnimationInfo.animationName + "'.", 244, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Maps\\Objects\\BoardCharacterObject.cs");
            }
        }