Example #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");
            }
        }
Example #2
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");
            }
        }
        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");
            }
        }