public static Animator2D CreateAnimatedObjectEffectInstance([NotNull] AnimatedObjectDefinition definition, string animationName, [NotNull] Transform parent)
        {
            //IL_0038: Unknown result type (might be due to invalid IL or missing references)
            //IL_003d: Unknown result type (might be due to invalid IL or missing references)
            if (null == definition)
            {
                throw new NullReferenceException();
            }
            if (null == s_instance)
            {
                Log.Error("CreateAnimatedObjectEffectInstance called while the factory is not ready.", 367, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Fight\\FightObjectFactory.cs");
                return(null);
            }
            Animator2D component = s_animatedObjectEffectPool.Instantiate(parent.get_position(), Quaternion.get_identity(), parent).GetComponent <Animator2D>();

            if (!string.IsNullOrEmpty(animationName))
            {
                component.SetAnimation(animationName, false, false, true);
            }
            else
            {
                component.set_animationLoops(false);
            }
            component.SetDefinition(definition, null, (Graphic[])null);
            return(component);
        }
 protected unsafe override void ClearAnimatorDefinition()
 {
     //IL_000d: Unknown result type (might be due to invalid IL or missing references)
     //IL_0017: Expected O, but got Unknown
     m_animator2D.remove_Initialised(new Animator2DInitialisedEventHandler((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/));
     m_animator2D.SetDefinition(null, null, (Graphic[])null);
 }
Example #3
0
 public unsafe void SetCharacterData(AnimatedFightCharacterData data, AnimatedObjectDefinition def)
 {
     //IL_0014: Unknown result type (might be due to invalid IL or missing references)
     //IL_001e: Expected O, but got Unknown
     m_characterData = data;
     m_animator2D.add_Initialised(new Animator2DInitialisedEventHandler((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/));
     m_animator2D.SetDefinition(def, null, (Graphic[])null);
 }
Example #4
0
 private unsafe void OnEnable()
 {
     //IL_0035: Unknown result type (might be due to invalid IL or missing references)
     //IL_003f: Expected O, but got Unknown
     m_animator2D = CreateAnimatorComponent();
     if (m_animatedObjectDefinition != null && m_animatedObjectDefinition != null)
     {
         m_animator2D.add_Initialised(new Animator2DInitialisedEventHandler((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/));
         m_animator2D.SetDefinition(m_animatedObjectDefinition, null, (Graphic[])null);
     }
 }
        protected unsafe override IEnumerator SetAnimatorDefinition()
        {
            Animator2D animator = m_animator2D;

            animator.add_Initialised(new Animator2DInitialisedEventHandler((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/));
            AnimatedBoardCharacterData animatedBoardCharacterData = (AnimatedBoardCharacterData)GetAnimatedCharacterData();

            animator.SetDefinition(animatedBoardCharacterData.animatedObjectDefinition, null, (Graphic[])null);
            while (true)
            {
                Animator2DInitialisationState initialisationState = animator.GetInitialisationState();
                if ((int)initialisationState == 1 || ((int)initialisationState == 2 && animator.get_isActiveAndEnabled()))
                {
                    yield return(null);

                    continue;
                }
                break;
            }
        }