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; } }
protected override void OnMapRotationChanged(DirectionAngle previousMapRotation, DirectionAngle newMapRotation) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Invalid comparison between Unknown and I4 //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) base.OnMapRotationChanged(previousMapRotation, newMapRotation); Animator2D animator2D = m_animator2D; if ((int)animator2D.GetInitialisationState() == 3) { Vector2 position = Vector2Int.op_Implicit(m_cellObject.coords); CharacterAnimationParameters animationParameters = m_animationParameters; CharacterAnimationInfo characterAnimationInfo; if (m_animationParameters.secondDirection == Direction.None) { characterAnimationInfo = new CharacterAnimationInfo(position, animationParameters.animationName, animationParameters.timelineKey, animationParameters.loops, direction, newMapRotation); } else { DirectionAngle angle = newMapRotation.Substract(previousMapRotation); Direction previousDirection = animationParameters.firstDirection.Rotate(angle); characterAnimationInfo = new CharacterAnimationInfo(position, animationParameters.animationName, animationParameters.timelineKey, animationParameters.loops, previousDirection, direction, newMapRotation); } animator2D.get_transform().set_localRotation(characterAnimationInfo.flipX ? Quaternion.Euler(0f, -135f, 0f) : Quaternion.Euler(0f, 45f, 0f)); string animationName = characterAnimationInfo.animationName; int currentFrame = animator2D.get_currentFrame(); m_animationCallback.ChangeAnimationName(animationName); animator2D.SetAnimation(animationName, characterAnimationInfo.loops, false, true); animator2D.set_currentFrame(currentFrame); m_animationParameters = characterAnimationInfo.parameters; } }