private unsafe void InitCallback(object sender, Animator2DInitialisedEventArgs e) { //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*/)); PlayAnim(GetDefaultAnim(), loop: true, randomStartFrame: true); }
private unsafe void OnAnimatorInitialized(object sender, Animator2DInitialisedEventArgs e) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown Animator2D animator2D = m_animator2D; animator2D.remove_Initialised(new Animator2DInitialisedEventHandler((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/)); animator2D.set_paused(false); PlayIdleAnimation(); }
private void OnAnimatorInitialized(object sender, Animator2DInitialisedEventArgs e) { m_animator2D.set_paused(false); GoToIdle(); }
private void Awake() { //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Expected O, but got Unknown m_controller = this.GetComponent <Animation>(); if (null == m_controller) { m_controller = this.get_gameObject().AddComponent <Animation>(); if (null != m_spawnAnimation) { m_controller.AddClip(m_spawnAnimation, m_spawnAnimation.get_name()); } if (null != m_idleAnimation) { m_controller.AddClip(m_idleAnimation, m_idleAnimation.get_name()); } if (null != m_detectionAnimation) { m_controller.AddClip(m_detectionAnimation, m_detectionAnimation.get_name()); } if (null != m_allyActivationAnimation) { m_controller.AddClip(m_allyActivationAnimation, m_allyActivationAnimation.get_name()); } if (null != m_opponentActivationAnimation) { m_controller.AddClip(m_opponentActivationAnimation, m_opponentActivationAnimation.get_name()); } if (null != m_destructionAnimation) { m_controller.AddClip(m_destructionAnimation, m_destructionAnimation.get_name()); } } else { int clipCount = m_controller.GetClipCount(); if (clipCount > 0) { int num = 0; string[] array = new string[clipCount]; IEnumerator enumerator = m_controller.GetEnumerator(); while (enumerator.MoveNext()) { AnimationState val = enumerator.Current as AnimationState; if (null != val) { string name = val.get_name(); AnimationClip clip = val.get_clip(); if (null != clip) { foreach (AnimationClip item in EnumerateAnimationProperties()) { if (!(clip == item) || !item.get_name().Equals(name)) { continue; } goto IL_01ec; } } array[num] = val.get_name(); num++; } IL_01ec :; } for (int i = 0; i < num; i++) { m_controller.RemoveClip(array[i]); } } foreach (AnimationClip item2 in EnumerateAnimationProperties()) { if (null != item2 && null == m_controller.get_Item(item2.get_name())) { m_controller.AddClip(item2, item2.get_name()); } } } m_controller.set_playAutomatically(false); if (this.Initialised != null) { Animator2DInitialisedEventArgs val2 = new Animator2DInitialisedEventArgs(); this.Initialised.Invoke((object)this, val2); } }