/// <summary> /// Creates the animator substate machine for this motion. /// </summary> protected override void CreateStateMachine() { // Grab the root sm for the layer UnityEditor.Animations.AnimatorStateMachine lRootStateMachine = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lSM_34270 = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lRootSubStateMachine = null; // If we find the sm with our name, remove it for (int i = 0; i < lRootStateMachine.stateMachines.Length; i++) { // Look for a sm with the matching name if (lRootStateMachine.stateMachines[i].stateMachine.name == _EditorAnimatorSMName) { lRootSubStateMachine = lRootStateMachine.stateMachines[i].stateMachine; // Allow the user to stop before we remove the sm if (!UnityEditor.EditorUtility.DisplayDialog("Motion Controller", _EditorAnimatorSMName + " already exists. Delete and recreate it?", "Yes", "No")) { return; } // Remove the sm //lRootStateMachine.RemoveStateMachine(lRootStateMachine.stateMachines[i].stateMachine); break; } } UnityEditor.Animations.AnimatorStateMachine lSM_35666 = lRootSubStateMachine; if (lSM_35666 != null) { for (int i = lSM_35666.entryTransitions.Length - 1; i >= 0; i--) { lSM_35666.RemoveEntryTransition(lSM_35666.entryTransitions[i]); } for (int i = lSM_35666.anyStateTransitions.Length - 1; i >= 0; i--) { lSM_35666.RemoveAnyStateTransition(lSM_35666.anyStateTransitions[i]); } for (int i = lSM_35666.states.Length - 1; i >= 0; i--) { lSM_35666.RemoveState(lSM_35666.states[i].state); } for (int i = lSM_35666.stateMachines.Length - 1; i >= 0; i--) { lSM_35666.RemoveStateMachine(lSM_35666.stateMachines[i].stateMachine); } } else { lSM_35666 = lSM_34270.AddStateMachine(_EditorAnimatorSMName, new Vector3(192, -480, 0)); } UnityEditor.Animations.AnimatorState lS_35692 = lSM_35666.AddState("EmptyPose", new Vector3(312, 84, 0)); lS_35692.speed = 1f; // Create the transition from the any state. Note that 'AnyState' transitions have to be added to the root UnityEditor.Animations.AnimatorStateTransition lT_35676 = lRootStateMachine.AddAnyStateTransition(lS_35692); lT_35676.hasExitTime = false; lT_35676.hasFixedDuration = true; lT_35676.exitTime = 0.75f; lT_35676.duration = 0.15f; lT_35676.offset = 0f; lT_35676.mute = false; lT_35676.solo = false; lT_35676.canTransitionToSelf = false; lT_35676.orderedInterruption = false; lT_35676.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 2; lT_35676.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 3010f, "L" + mMotionLayer._AnimatorLayerIndex + "MotionPhase"); lT_35676.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 0f, "L" + mMotionLayer._AnimatorLayerIndex + "MotionForm"); lT_35676.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 0f, "L" + mMotionLayer._AnimatorLayerIndex + "MotionParameter"); // Create the transition from the any state. Note that 'AnyState' transitions have to be added to the root UnityEditor.Animations.AnimatorStateTransition lT_35678 = lRootStateMachine.AddAnyStateTransition(lS_35692); lT_35678.hasExitTime = false; lT_35678.hasFixedDuration = true; lT_35678.exitTime = 0.75f; lT_35678.duration = 0f; lT_35678.offset = 0f; lT_35678.mute = false; lT_35678.solo = false; lT_35678.canTransitionToSelf = false; lT_35678.orderedInterruption = false; lT_35678.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 2; lT_35678.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 3010f, "L" + mMotionLayer._AnimatorLayerIndex + "MotionPhase"); lT_35678.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 0f, "L" + mMotionLayer._AnimatorLayerIndex + "MotionForm"); lT_35678.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 1f, "L" + mMotionLayer._AnimatorLayerIndex + "MotionParameter"); }
/// <summary> /// Creates the animator substate machine for this motion. /// </summary> protected override void CreateStateMachine() { // Grab the root sm for the layer UnityEditor.Animations.AnimatorStateMachine lRootStateMachine = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lSM_25382 = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lRootSubStateMachine = null; // If we find the sm with our name, remove it for (int i = 0; i < lRootStateMachine.stateMachines.Length; i++) { // Look for a sm with the matching name if (lRootStateMachine.stateMachines[i].stateMachine.name == _EditorAnimatorSMName) { lRootSubStateMachine = lRootStateMachine.stateMachines[i].stateMachine; // Allow the user to stop before we remove the sm if (!UnityEditor.EditorUtility.DisplayDialog("Motion Controller", _EditorAnimatorSMName + " already exists. Delete and recreate it?", "Yes", "No")) { return; } // Remove the sm //lRootStateMachine.RemoveStateMachine(lRootStateMachine.stateMachines[i].stateMachine); break; } } UnityEditor.Animations.AnimatorStateMachine lSM_N1608508 = lRootSubStateMachine; if (lSM_N1608508 != null) { for (int i = lSM_N1608508.entryTransitions.Length - 1; i >= 0; i--) { lSM_N1608508.RemoveEntryTransition(lSM_N1608508.entryTransitions[i]); } for (int i = lSM_N1608508.anyStateTransitions.Length - 1; i >= 0; i--) { lSM_N1608508.RemoveAnyStateTransition(lSM_N1608508.anyStateTransitions[i]); } for (int i = lSM_N1608508.states.Length - 1; i >= 0; i--) { lSM_N1608508.RemoveState(lSM_N1608508.states[i].state); } for (int i = lSM_N1608508.stateMachines.Length - 1; i >= 0; i--) { lSM_N1608508.RemoveStateMachine(lSM_N1608508.stateMachines[i].stateMachine); } } else { lSM_N1608508 = lSM_25382.AddStateMachine(_EditorAnimatorSMName, new Vector3(192, -564, 0)); } UnityEditor.Animations.AnimatorState lS_N1612918 = lSM_N1608508.AddState("LandToIdle", new Vector3(720, 264, 0)); lS_N1612918.speed = 1f; lS_N1612918.motion = m16578; UnityEditor.Animations.AnimatorState lS_N1612942 = lSM_N1608508.AddState("FallToLand", new Vector3(480, 264, 0)); lS_N1612942.speed = 1f; lS_N1612942.motion = m16574; UnityEditor.Animations.AnimatorState lS_N1626950 = lSM_N1608508.AddState("FallPose", new Vector3(240, 264, 0)); lS_N1626950.speed = 1f; lS_N1626950.motion = m16572; UnityEditor.Animations.AnimatorState lS_N1644298 = lSM_N1608508.AddState("IdlePose", new Vector3(960, 264, 0)); lS_N1644298.speed = 1f; lS_N1644298.motion = m14540; // Create the transition from the any state. Note that 'AnyState' transitions have to be added to the root UnityEditor.Animations.AnimatorStateTransition lT_N1951384 = lRootStateMachine.AddAnyStateTransition(lS_N1626950); lT_N1951384.hasExitTime = false; lT_N1951384.hasFixedDuration = true; lT_N1951384.exitTime = 0.9f; lT_N1951384.duration = 0.2f; lT_N1951384.offset = 0f; lT_N1951384.mute = false; lT_N1951384.solo = false; lT_N1951384.canTransitionToSelf = true; lT_N1951384.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; lT_N1951384.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 1800f, "L0MotionPhase"); UnityEditor.Animations.AnimatorStateTransition lT_N1644504 = lS_N1612918.AddTransition(lS_N1644298); lT_N1644504.hasExitTime = true; lT_N1644504.hasFixedDuration = true; lT_N1644504.exitTime = 0.8141199f; lT_N1644504.duration = 0.116312f; lT_N1644504.offset = 0f; lT_N1644504.mute = false; lT_N1644504.solo = false; lT_N1644504.canTransitionToSelf = true; lT_N1644504.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; UnityEditor.Animations.AnimatorStateTransition lT_N1612980 = lS_N1612942.AddTransition(lS_N1612918); lT_N1612980.hasExitTime = true; lT_N1612980.hasFixedDuration = true; lT_N1612980.exitTime = 0.5f; lT_N1612980.duration = 0.2f; lT_N1612980.offset = 0.485189f; lT_N1612980.mute = false; lT_N1612980.solo = false; lT_N1612980.canTransitionToSelf = true; lT_N1612980.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; UnityEditor.Animations.AnimatorStateTransition lT_N1626992 = lS_N1626950.AddTransition(lS_N1612942); lT_N1626992.hasExitTime = false; lT_N1626992.hasFixedDuration = true; lT_N1626992.exitTime = 1f; lT_N1626992.duration = 0.1f; lT_N1626992.offset = 0f; lT_N1626992.mute = false; lT_N1626992.solo = false; lT_N1626992.canTransitionToSelf = true; lT_N1626992.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; lT_N1626992.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 1805f, "L0MotionPhase"); }
/// <summary> /// Creates the animator substate machine for this motion. /// </summary> protected override void CreateStateMachine() { // Grab the root sm for the layer UnityEditor.Animations.AnimatorStateMachine lRootStateMachine = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lSM_21500 = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lRootSubStateMachine = null; // If we find the sm with our name, remove it for (int i = 0; i < lRootStateMachine.stateMachines.Length; i++) { // Look for a sm with the matching name if (lRootStateMachine.stateMachines[i].stateMachine.name == _EditorAnimatorSMName) { lRootSubStateMachine = lRootStateMachine.stateMachines[i].stateMachine; // Allow the user to stop before we remove the sm if (!UnityEditor.EditorUtility.DisplayDialog("Motion Controller", _EditorAnimatorSMName + " already exists. Delete and recreate it?", "Yes", "No")) { return; } // Remove the sm //lRootStateMachine.RemoveStateMachine(lRootStateMachine.stateMachines[i].stateMachine); break; } } UnityEditor.Animations.AnimatorStateMachine lSM_21546 = lRootSubStateMachine; if (lSM_21546 != null) { for (int i = lSM_21546.entryTransitions.Length - 1; i >= 0; i--) { lSM_21546.RemoveEntryTransition(lSM_21546.entryTransitions[i]); } for (int i = lSM_21546.anyStateTransitions.Length - 1; i >= 0; i--) { lSM_21546.RemoveAnyStateTransition(lSM_21546.anyStateTransitions[i]); } for (int i = lSM_21546.states.Length - 1; i >= 0; i--) { lSM_21546.RemoveState(lSM_21546.states[i].state); } for (int i = lSM_21546.stateMachines.Length - 1; i >= 0; i--) { lSM_21546.RemoveStateMachine(lSM_21546.stateMachines[i].stateMachine); } } else { lSM_21546 = lSM_21500.AddStateMachine(_EditorAnimatorSMName, new Vector3(192, -696, 0)); } UnityEditor.Animations.AnimatorState lS_22652 = lSM_21546.AddState("IdlePose", new Vector3(504, 72, 0)); lS_22652.speed = 1f; lS_22652.motion = m14306; UnityEditor.Animations.AnimatorState lS_21796 = lSM_21546.AddState("Move Tree", new Vector3(264, 72, 0)); lS_21796.speed = 1f; UnityEditor.Animations.BlendTree lM_15642 = CreateBlendTree("Blend Tree", _EditorAnimatorController, mMotionLayer.AnimatorLayerIndex); lM_15642.blendType = UnityEditor.Animations.BlendTreeType.FreeformCartesian2D; lM_15642.blendParameter = "InputX"; lM_15642.blendParameterY = "InputY"; #if !(UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3) lM_15642.useAutomaticThresholds = true; #endif lM_15642.AddChild(m14708, new Vector2(0f, 0.7f)); UnityEditor.Animations.ChildMotion[] lM_15642_0_Children = lM_15642.children; lM_15642_0_Children[lM_15642_0_Children.Length - 1].mirror = false; lM_15642_0_Children[lM_15642_0_Children.Length - 1].timeScale = 1.2f; lM_15642.children = lM_15642_0_Children; lM_15642.AddChild(m14710, new Vector2(-0.7f, 0.7f)); UnityEditor.Animations.ChildMotion[] lM_15642_1_Children = lM_15642.children; lM_15642_1_Children[lM_15642_1_Children.Length - 1].mirror = false; lM_15642_1_Children[lM_15642_1_Children.Length - 1].timeScale = 1.1f; lM_15642.children = lM_15642_1_Children; lM_15642.AddChild(m14712, new Vector2(0.7f, 0.7f)); UnityEditor.Animations.ChildMotion[] lM_15642_2_Children = lM_15642.children; lM_15642_2_Children[lM_15642_2_Children.Length - 1].mirror = false; lM_15642_2_Children[lM_15642_2_Children.Length - 1].timeScale = 1.1f; lM_15642.children = lM_15642_2_Children; lM_15642.AddChild(m14716, new Vector2(-0.7f, 0f)); UnityEditor.Animations.ChildMotion[] lM_15642_3_Children = lM_15642.children; lM_15642_3_Children[lM_15642_3_Children.Length - 1].mirror = false; lM_15642_3_Children[lM_15642_3_Children.Length - 1].timeScale = 1.1f; lM_15642.children = lM_15642_3_Children; lM_15642.AddChild(m14714, new Vector2(0f, 0f)); UnityEditor.Animations.ChildMotion[] lM_15642_4_Children = lM_15642.children; lM_15642_4_Children[lM_15642_4_Children.Length - 1].mirror = false; lM_15642_4_Children[lM_15642_4_Children.Length - 1].timeScale = 1.3f; lM_15642.children = lM_15642_4_Children; lM_15642.AddChild(m14718, new Vector2(0.7f, 0f)); UnityEditor.Animations.ChildMotion[] lM_15642_5_Children = lM_15642.children; lM_15642_5_Children[lM_15642_5_Children.Length - 1].mirror = false; lM_15642_5_Children[lM_15642_5_Children.Length - 1].timeScale = 1.5f; lM_15642.children = lM_15642_5_Children; lM_15642.AddChild(m14704, new Vector2(-0.7f, -0.7f)); UnityEditor.Animations.ChildMotion[] lM_15642_6_Children = lM_15642.children; lM_15642_6_Children[lM_15642_6_Children.Length - 1].mirror = false; lM_15642_6_Children[lM_15642_6_Children.Length - 1].timeScale = 1.5f; lM_15642.children = lM_15642_6_Children; lM_15642.AddChild(m14706, new Vector2(0.7f, -0.7f)); UnityEditor.Animations.ChildMotion[] lM_15642_7_Children = lM_15642.children; lM_15642_7_Children[lM_15642_7_Children.Length - 1].mirror = false; lM_15642_7_Children[lM_15642_7_Children.Length - 1].timeScale = 1.5f; lM_15642.children = lM_15642_7_Children; lM_15642.AddChild(m14702, new Vector2(0f, -0.7f)); UnityEditor.Animations.ChildMotion[] lM_15642_8_Children = lM_15642.children; lM_15642_8_Children[lM_15642_8_Children.Length - 1].mirror = false; lM_15642_8_Children[lM_15642_8_Children.Length - 1].timeScale = 1.5f; lM_15642.children = lM_15642_8_Children; lS_21796.motion = lM_15642; // Create the transition from the any state. Note that 'AnyState' transitions have to be added to the root UnityEditor.Animations.AnimatorStateTransition lT_21654 = lRootStateMachine.AddAnyStateTransition(lS_21796); lT_21654.hasExitTime = false; lT_21654.hasFixedDuration = true; lT_21654.exitTime = 0.9f; lT_21654.duration = 0.2f; lT_21654.offset = 0f; lT_21654.mute = false; lT_21654.solo = false; lT_21654.canTransitionToSelf = true; lT_21654.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; lT_21654.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 620f, "L0MotionPhase"); UnityEditor.Animations.AnimatorStateTransition lT_22654 = lS_21796.AddTransition(lS_22652); lT_22654.hasExitTime = false; lT_22654.hasFixedDuration = true; lT_22654.exitTime = 0.9f; lT_22654.duration = 0.2f; lT_22654.offset = 0f; lT_22654.mute = false; lT_22654.solo = false; lT_22654.canTransitionToSelf = true; lT_22654.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; lT_22654.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 610f, "L0MotionPhase"); }
/// <summary> /// Creates the animator substate machine for this motion. /// </summary> protected override void CreateStateMachine() { // Grab the root sm for the layer UnityEditor.Animations.AnimatorStateMachine lRootStateMachine = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lSM_23030 = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lRootSubStateMachine = null; // If we find the sm with our name, remove it for (int i = 0; i < lRootStateMachine.stateMachines.Length; i++) { // Look for a sm with the matching name if (lRootStateMachine.stateMachines[i].stateMachine.name == _EditorAnimatorSMName) { lRootSubStateMachine = lRootStateMachine.stateMachines[i].stateMachine; // Allow the user to stop before we remove the sm if (!UnityEditor.EditorUtility.DisplayDialog("Motion Controller", _EditorAnimatorSMName + " already exists. Delete and recreate it?", "Yes", "No")) { return; } // Remove the sm //lRootStateMachine.RemoveStateMachine(lRootStateMachine.stateMachines[i].stateMachine); break; } } UnityEditor.Animations.AnimatorStateMachine lSM_24308 = lRootSubStateMachine; if (lSM_24308 != null) { for (int i = lSM_24308.entryTransitions.Length - 1; i >= 0; i--) { lSM_24308.RemoveEntryTransition(lSM_24308.entryTransitions[i]); } for (int i = lSM_24308.anyStateTransitions.Length - 1; i >= 0; i--) { lSM_24308.RemoveAnyStateTransition(lSM_24308.anyStateTransitions[i]); } for (int i = lSM_24308.states.Length - 1; i >= 0; i--) { lSM_24308.RemoveState(lSM_24308.states[i].state); } for (int i = lSM_24308.stateMachines.Length - 1; i >= 0; i--) { lSM_24308.RemoveStateMachine(lSM_24308.stateMachines[i].stateMachine); } } else { lSM_24308 = lSM_23030.AddStateMachine(_EditorAnimatorSMName, new Vector3(48, 12, 0)); } UnityEditor.Animations.AnimatorState lS_24312 = lSM_24308.AddState("Punch", new Vector3(276, 12, 0)); lS_24312.speed = 1f; lS_24312.motion = m17128; // Create the transition from the any state. Note that 'AnyState' transitions have to be added to the root UnityEditor.Animations.AnimatorStateTransition lT_24310 = lRootStateMachine.AddAnyStateTransition(lS_24312); lT_24310.hasExitTime = false; lT_24310.hasFixedDuration = false; lT_24310.exitTime = 0.9f; lT_24310.duration = 0.1f; lT_24310.offset = 0f; lT_24310.mute = false; lT_24310.solo = false; lT_24310.canTransitionToSelf = true; lT_24310.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; lT_24310.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 500f, "L1MotionPhase"); UnityEditor.Animations.AnimatorStateTransition lT_24314 = lS_24312.AddTransition(lRootStateMachine); lT_24314.hasExitTime = true; lT_24314.hasFixedDuration = true; lT_24314.exitTime = 0.8f; lT_24314.duration = 0.2f; lT_24314.offset = 0f; lT_24314.mute = false; lT_24314.solo = false; lT_24314.canTransitionToSelf = true; lT_24314.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; }
/// <summary> /// Creates the animator substate machine for this motion. /// </summary> protected override void CreateStateMachine() { // Grab the root sm for the layer UnityEditor.Animations.AnimatorStateMachine lRootStateMachine = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lSM_41656 = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lRootSubStateMachine = null; // If we find the sm with our name, remove it for (int i = 0; i < lRootStateMachine.stateMachines.Length; i++) { // Look for a sm with the matching name if (lRootStateMachine.stateMachines[i].stateMachine.name == _EditorAnimatorSMName) { lRootSubStateMachine = lRootStateMachine.stateMachines[i].stateMachine; // Allow the user to stop before we remove the sm if (!UnityEditor.EditorUtility.DisplayDialog("Motion Controller", _EditorAnimatorSMName + " already exists. Delete and recreate it?", "Yes", "No")) { return; } // Remove the sm //lRootStateMachine.RemoveStateMachine(lRootStateMachine.stateMachines[i].stateMachine); break; } } UnityEditor.Animations.AnimatorStateMachine lSM_41686 = lRootSubStateMachine; if (lSM_41686 != null) { for (int i = lSM_41686.entryTransitions.Length - 1; i >= 0; i--) { lSM_41686.RemoveEntryTransition(lSM_41686.entryTransitions[i]); } for (int i = lSM_41686.anyStateTransitions.Length - 1; i >= 0; i--) { lSM_41686.RemoveAnyStateTransition(lSM_41686.anyStateTransitions[i]); } for (int i = lSM_41686.states.Length - 1; i >= 0; i--) { lSM_41686.RemoveState(lSM_41686.states[i].state); } for (int i = lSM_41686.stateMachines.Length - 1; i >= 0; i--) { lSM_41686.RemoveStateMachine(lSM_41686.stateMachines[i].stateMachine); } } else { lSM_41686 = lSM_41656.AddStateMachine(_EditorAnimatorSMName, new Vector3(192, 324, 0)); } UnityEditor.Animations.AnimatorState lS_42706 = lSM_41686.AddState("Spell Idle Out", new Vector3(576, 48, 0)); lS_42706.speed = 1f; lS_42706.motion = m20620; UnityEditor.Animations.AnimatorState lS_42708 = lSM_41686.AddState("Stand Idle Out", new Vector3(576, 120, 0)); lS_42708.speed = 1f; lS_42708.motion = m17212; UnityEditor.Animations.AnimatorState lS_41992 = lSM_41686.AddState("Store Spell", new Vector3(312, 120, 0)); lS_41992.speed = -1.1f; lS_41992.motion = m19754; UnityEditor.Animations.AnimatorState lS_41990 = lSM_41686.AddState("Equip Spell", new Vector3(312, 48, 0)); lS_41990.speed = 1.1f; lS_41990.motion = m19754; // Create the transition from the any state. Note that 'AnyState' transitions have to be added to the root UnityEditor.Animations.AnimatorStateTransition lT_41758 = lRootStateMachine.AddAnyStateTransition(lS_41990); lT_41758.hasExitTime = false; lT_41758.hasFixedDuration = true; lT_41758.exitTime = 0.9f; lT_41758.duration = 0.1f; lT_41758.offset = 0f; lT_41758.mute = false; lT_41758.solo = false; lT_41758.canTransitionToSelf = true; lT_41758.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; lT_41758.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 32110f, "L0MotionPhase"); // Create the transition from the any state. Note that 'AnyState' transitions have to be added to the root UnityEditor.Animations.AnimatorStateTransition lT_41760 = lRootStateMachine.AddAnyStateTransition(lS_41992); lT_41760.hasExitTime = false; lT_41760.hasFixedDuration = true; lT_41760.exitTime = 0.9f; lT_41760.duration = 0.2f; lT_41760.offset = 0f; lT_41760.mute = false; lT_41760.solo = false; lT_41760.canTransitionToSelf = true; lT_41760.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; lT_41760.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 32115f, "L0MotionPhase"); UnityEditor.Animations.AnimatorStateTransition lT_42710 = lS_41992.AddTransition(lS_42708); lT_42710.hasExitTime = true; lT_42710.hasFixedDuration = true; lT_42710.exitTime = 0.8857439f; lT_42710.duration = 0.1033962f; lT_42710.offset = 1.507076f; lT_42710.mute = false; lT_42710.solo = false; lT_42710.canTransitionToSelf = true; lT_42710.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; UnityEditor.Animations.AnimatorStateTransition lT_42712 = lS_41990.AddTransition(lS_42706); lT_42712.hasExitTime = true; lT_42712.hasFixedDuration = true; lT_42712.exitTime = 0.5385581f; lT_42712.duration = 0.3215042f; lT_42712.offset = 0f; lT_42712.mute = false; lT_42712.solo = false; lT_42712.canTransitionToSelf = true; lT_42712.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; }
/// <summary> /// Creates the animator substate machine for this motion. /// </summary> protected override void CreateStateMachine() { // Grab the root sm for the layer UnityEditor.Animations.AnimatorStateMachine lRootStateMachine = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lSM_38592 = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lRootSubStateMachine = null; // If we find the sm with our name, remove it for (int i = 0; i < lRootStateMachine.stateMachines.Length; i++) { // Look for a sm with the matching name if (lRootStateMachine.stateMachines[i].stateMachine.name == _EditorAnimatorSMName) { lRootSubStateMachine = lRootStateMachine.stateMachines[i].stateMachine; // Allow the user to stop before we remove the sm if (!UnityEditor.EditorUtility.DisplayDialog("Motion Controller", _EditorAnimatorSMName + " already exists. Delete and recreate it?", "Yes", "No")) { return; } // Remove the sm //lRootStateMachine.RemoveStateMachine(lRootStateMachine.stateMachines[i].stateMachine); break; } } UnityEditor.Animations.AnimatorStateMachine lSM_N2165318 = lRootSubStateMachine; if (lSM_N2165318 != null) { for (int i = lSM_N2165318.entryTransitions.Length - 1; i >= 0; i--) { lSM_N2165318.RemoveEntryTransition(lSM_N2165318.entryTransitions[i]); } for (int i = lSM_N2165318.anyStateTransitions.Length - 1; i >= 0; i--) { lSM_N2165318.RemoveAnyStateTransition(lSM_N2165318.anyStateTransitions[i]); } for (int i = lSM_N2165318.states.Length - 1; i >= 0; i--) { lSM_N2165318.RemoveState(lSM_N2165318.states[i].state); } for (int i = lSM_N2165318.stateMachines.Length - 1; i >= 0; i--) { lSM_N2165318.RemoveStateMachine(lSM_N2165318.stateMachines[i].stateMachine); } } else { lSM_N2165318 = lSM_38592.AddStateMachine(_EditorAnimatorSMName, new Vector3(420, 324, 0)); } UnityEditor.Animations.AnimatorState lS_N2165320 = lSM_N2165318.AddState("IdlePose Out", new Vector3(600, 120, 0)); lS_N2165320.speed = 1f; lS_N2165320.motion = m19780; UnityEditor.Animations.AnimatorState lS_N2165322 = lSM_N2165318.AddState("Move Tree", new Vector3(312, 120, 0)); lS_N2165322.speed = 1f; UnityEditor.Animations.BlendTree lM_N2165324 = CreateBlendTree("Move Blend Tree", _EditorAnimatorController, mMotionLayer.AnimatorLayerIndex); lM_N2165324.blendType = UnityEditor.Animations.BlendTreeType.Simple1D; lM_N2165324.blendParameter = "InputMagnitude"; lM_N2165324.blendParameterY = "InputX"; #if !(UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3) lM_N2165324.useAutomaticThresholds = true; #endif lM_N2165324.AddChild(m19780, 0f); UnityEditor.Animations.BlendTree lM_N2165328 = CreateBlendTree("WalkTree", _EditorAnimatorController, mMotionLayer.AnimatorLayerIndex); lM_N2165328.blendType = UnityEditor.Animations.BlendTreeType.SimpleDirectional2D; lM_N2165328.blendParameter = "InputX"; lM_N2165328.blendParameterY = "InputY"; #if !(UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3) lM_N2165328.useAutomaticThresholds = true; #endif lM_N2165328.AddChild(m17768, new Vector2(0f, 0.35f)); UnityEditor.Animations.ChildMotion[] lM_N2165328_0_Children = lM_N2165328.children; lM_N2165328_0_Children[lM_N2165328_0_Children.Length - 1].mirror = false; lM_N2165328_0_Children[lM_N2165328_0_Children.Length - 1].timeScale = 1f; lM_N2165328.children = lM_N2165328_0_Children; lM_N2165328.AddChild(m23934, new Vector2(-0.35f, 0f)); UnityEditor.Animations.ChildMotion[] lM_N2165328_1_Children = lM_N2165328.children; lM_N2165328_1_Children[lM_N2165328_1_Children.Length - 1].mirror = false; lM_N2165328_1_Children[lM_N2165328_1_Children.Length - 1].timeScale = 1f; lM_N2165328.children = lM_N2165328_1_Children; lM_N2165328.AddChild(m25304, new Vector2(0.35f, 0f)); UnityEditor.Animations.ChildMotion[] lM_N2165328_2_Children = lM_N2165328.children; lM_N2165328_2_Children[lM_N2165328_2_Children.Length - 1].mirror = false; lM_N2165328_2_Children[lM_N2165328_2_Children.Length - 1].timeScale = 1f; lM_N2165328.children = lM_N2165328_2_Children; lM_N2165328.AddChild(m15900, new Vector2(0f, -0.35f)); UnityEditor.Animations.ChildMotion[] lM_N2165328_3_Children = lM_N2165328.children; lM_N2165328_3_Children[lM_N2165328_3_Children.Length - 1].mirror = false; lM_N2165328_3_Children[lM_N2165328_3_Children.Length - 1].timeScale = 1f; lM_N2165328.children = lM_N2165328_3_Children; lM_N2165324.AddChild(lM_N2165328, 0.5f); UnityEditor.Animations.BlendTree lM_N2165332 = CreateBlendTree("RunTree", _EditorAnimatorController, mMotionLayer.AnimatorLayerIndex); lM_N2165332.blendType = UnityEditor.Animations.BlendTreeType.SimpleDirectional2D; lM_N2165332.blendParameter = "InputX"; lM_N2165332.blendParameterY = "InputY"; #if !(UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3) lM_N2165332.useAutomaticThresholds = true; #endif lM_N2165332.AddChild(m16640, new Vector2(0f, 0.7f)); UnityEditor.Animations.ChildMotion[] lM_N2165332_0_Children = lM_N2165332.children; lM_N2165332_0_Children[lM_N2165332_0_Children.Length - 1].mirror = false; lM_N2165332_0_Children[lM_N2165332_0_Children.Length - 1].timeScale = 1f; lM_N2165332.children = lM_N2165332_0_Children; lM_N2165332.AddChild(m15614, new Vector2(-0.7f, 0f)); UnityEditor.Animations.ChildMotion[] lM_N2165332_1_Children = lM_N2165332.children; lM_N2165332_1_Children[lM_N2165332_1_Children.Length - 1].mirror = false; lM_N2165332_1_Children[lM_N2165332_1_Children.Length - 1].timeScale = 1f; lM_N2165332.children = lM_N2165332_1_Children; lM_N2165332.AddChild(m24920, new Vector2(0.7f, 0f)); UnityEditor.Animations.ChildMotion[] lM_N2165332_2_Children = lM_N2165332.children; lM_N2165332_2_Children[lM_N2165332_2_Children.Length - 1].mirror = false; lM_N2165332_2_Children[lM_N2165332_2_Children.Length - 1].timeScale = 1f; lM_N2165332.children = lM_N2165332_2_Children; lM_N2165332.AddChild(m16328, new Vector2(0f, -0.7f)); UnityEditor.Animations.ChildMotion[] lM_N2165332_3_Children = lM_N2165332.children; lM_N2165332_3_Children[lM_N2165332_3_Children.Length - 1].mirror = false; lM_N2165332_3_Children[lM_N2165332_3_Children.Length - 1].timeScale = 1f; lM_N2165332.children = lM_N2165332_3_Children; lM_N2165324.AddChild(lM_N2165332, 1f); lS_N2165322.motion = lM_N2165324; // Create the transition from the any state. Note that 'AnyState' transitions have to be added to the root UnityEditor.Animations.AnimatorStateTransition lT_N2165336 = lRootStateMachine.AddAnyStateTransition(lS_N2165322); lT_N2165336.hasExitTime = false; lT_N2165336.hasFixedDuration = true; lT_N2165336.exitTime = 0.9f; lT_N2165336.duration = 0.4f; lT_N2165336.offset = 0f; lT_N2165336.mute = false; lT_N2165336.solo = false; lT_N2165336.canTransitionToSelf = true; lT_N2165336.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; lT_N2165336.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 32210f, "L0MotionPhase"); UnityEditor.Animations.AnimatorStateTransition lT_N2165338 = lS_N2165320.AddTransition(lS_N2165322); lT_N2165338.hasExitTime = false; lT_N2165338.hasFixedDuration = true; lT_N2165338.exitTime = 0f; lT_N2165338.duration = 0.25f; lT_N2165338.offset = 0f; lT_N2165338.mute = false; lT_N2165338.solo = false; lT_N2165338.canTransitionToSelf = true; lT_N2165338.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; lT_N2165338.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Greater, 0.1f, "InputMagnitude"); UnityEditor.Animations.AnimatorStateTransition lT_N2165340 = lS_N2165322.AddTransition(lS_N2165320); lT_N2165340.hasExitTime = false; lT_N2165340.hasFixedDuration = true; lT_N2165340.exitTime = 1f; lT_N2165340.duration = 0.25f; lT_N2165340.offset = 0f; lT_N2165340.mute = false; lT_N2165340.solo = false; lT_N2165340.canTransitionToSelf = true; lT_N2165340.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; lT_N2165340.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 32215f, "L0MotionPhase"); lT_N2165340.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 0f, "L0MotionParameter"); }
/// <summary> /// Creates the animator substate machine for this motion. /// </summary> protected override void CreateStateMachine() { // Grab the root sm for the layer UnityEditor.Animations.AnimatorStateMachine lRootStateMachine = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lSM_24530 = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lRootSubStateMachine = null; // If we find the sm with our name, remove it for (int i = 0; i < lRootStateMachine.stateMachines.Length; i++) { // Look for a sm with the matching name if (lRootStateMachine.stateMachines[i].stateMachine.name == _EditorAnimatorSMName) { lRootSubStateMachine = lRootStateMachine.stateMachines[i].stateMachine; // Allow the user to stop before we remove the sm if (!UnityEditor.EditorUtility.DisplayDialog("Motion Controller", _EditorAnimatorSMName + " already exists. Delete and recreate it?", "Yes", "No")) { return; } // Remove the sm //lRootStateMachine.RemoveStateMachine(lRootStateMachine.stateMachines[i].stateMachine); break; } } UnityEditor.Animations.AnimatorStateMachine lSM_24570 = lRootSubStateMachine; if (lSM_24570 != null) { for (int i = lSM_24570.entryTransitions.Length - 1; i >= 0; i--) { lSM_24570.RemoveEntryTransition(lSM_24570.entryTransitions[i]); } for (int i = lSM_24570.anyStateTransitions.Length - 1; i >= 0; i--) { lSM_24570.RemoveAnyStateTransition(lSM_24570.anyStateTransitions[i]); } for (int i = lSM_24570.states.Length - 1; i >= 0; i--) { lSM_24570.RemoveState(lSM_24570.states[i].state); } for (int i = lSM_24570.stateMachines.Length - 1; i >= 0; i--) { lSM_24570.RemoveStateMachine(lSM_24570.stateMachines[i].stateMachine); } } else { lSM_24570 = lSM_24530.AddStateMachine(_EditorAnimatorSMName, new Vector3(408, -756, 0)); } UnityEditor.Animations.AnimatorState lS_25730 = lSM_24570.AddState("IdlePose", new Vector3(600, 120, 0)); lS_25730.speed = 1f; lS_25730.motion = m14552; UnityEditor.Animations.AnimatorState lS_24896 = lSM_24570.AddState("Move Tree", new Vector3(312, 120, 0)); lS_24896.speed = 1f; UnityEditor.Animations.BlendTree lM_24106 = CreateBlendTree("Move Blend Tree", _EditorAnimatorController, mMotionLayer.AnimatorLayerIndex); lM_24106.blendType = UnityEditor.Animations.BlendTreeType.Simple1D; lM_24106.blendParameter = "InputMagnitude"; lM_24106.blendParameterY = "InputX"; #if !(UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3) lM_24106.useAutomaticThresholds = false; #endif lM_24106.AddChild(m14552, 0f); UnityEditor.Animations.BlendTree lM_24146 = CreateBlendTree("WalkTree", _EditorAnimatorController, mMotionLayer.AnimatorLayerIndex); lM_24146.blendType = UnityEditor.Animations.BlendTreeType.SimpleDirectional2D; lM_24146.blendParameter = "InputX"; lM_24146.blendParameterY = "InputY"; #if !(UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3) lM_24146.useAutomaticThresholds = true; #endif lM_24146.AddChild(m20884, new Vector2(0f, 0.35f)); UnityEditor.Animations.ChildMotion[] lM_24146_0_Children = lM_24146.children; lM_24146_0_Children[lM_24146_0_Children.Length - 1].mirror = false; lM_24146_0_Children[lM_24146_0_Children.Length - 1].timeScale = 1.1f; lM_24146.children = lM_24146_0_Children; lM_24146.AddChild(m20104, new Vector2(0.35f, 0.35f)); UnityEditor.Animations.ChildMotion[] lM_24146_1_Children = lM_24146.children; lM_24146_1_Children[lM_24146_1_Children.Length - 1].mirror = false; lM_24146_1_Children[lM_24146_1_Children.Length - 1].timeScale = 1.2f; lM_24146.children = lM_24146_1_Children; lM_24146.AddChild(m20102, new Vector2(-0.35f, 0.35f)); UnityEditor.Animations.ChildMotion[] lM_24146_2_Children = lM_24146.children; lM_24146_2_Children[lM_24146_2_Children.Length - 1].mirror = false; lM_24146_2_Children[lM_24146_2_Children.Length - 1].timeScale = 1.2f; lM_24146.children = lM_24146_2_Children; lM_24146.AddChild(m20106, new Vector2(-0.35f, 0f)); UnityEditor.Animations.ChildMotion[] lM_24146_3_Children = lM_24146.children; lM_24146_3_Children[lM_24146_3_Children.Length - 1].mirror = false; lM_24146_3_Children[lM_24146_3_Children.Length - 1].timeScale = 1.2f; lM_24146.children = lM_24146_3_Children; lM_24146.AddChild(m20108, new Vector2(0.35f, 0f)); UnityEditor.Animations.ChildMotion[] lM_24146_4_Children = lM_24146.children; lM_24146_4_Children[lM_24146_4_Children.Length - 1].mirror = false; lM_24146_4_Children[lM_24146_4_Children.Length - 1].timeScale = 1.2f; lM_24146.children = lM_24146_4_Children; lM_24146.AddChild(m21194, new Vector2(-0.35f, -0.35f)); UnityEditor.Animations.ChildMotion[] lM_24146_5_Children = lM_24146.children; lM_24146_5_Children[lM_24146_5_Children.Length - 1].mirror = false; lM_24146_5_Children[lM_24146_5_Children.Length - 1].timeScale = 1.1f; lM_24146.children = lM_24146_5_Children; lM_24146.AddChild(m21196, new Vector2(0.35f, -0.35f)); UnityEditor.Animations.ChildMotion[] lM_24146_6_Children = lM_24146.children; lM_24146_6_Children[lM_24146_6_Children.Length - 1].mirror = false; lM_24146_6_Children[lM_24146_6_Children.Length - 1].timeScale = 1.1f; lM_24146.children = lM_24146_6_Children; lM_24146.AddChild(m24326, new Vector2(0f, -0.35f)); UnityEditor.Animations.ChildMotion[] lM_24146_7_Children = lM_24146.children; lM_24146_7_Children[lM_24146_7_Children.Length - 1].mirror = false; lM_24146_7_Children[lM_24146_7_Children.Length - 1].timeScale = 1f; lM_24146.children = lM_24146_7_Children; lM_24106.AddChild(lM_24146, 0.5f); UnityEditor.Animations.BlendTree lM_24116 = CreateBlendTree("RunTree", _EditorAnimatorController, mMotionLayer.AnimatorLayerIndex); lM_24116.blendType = UnityEditor.Animations.BlendTreeType.SimpleDirectional2D; lM_24116.blendParameter = "InputX"; lM_24116.blendParameterY = "InputY"; #if !(UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3) lM_24116.useAutomaticThresholds = true; #endif lM_24116.AddChild(m14502, new Vector2(0f, 0.7f)); UnityEditor.Animations.ChildMotion[] lM_24116_0_Children = lM_24116.children; lM_24116_0_Children[lM_24116_0_Children.Length - 1].mirror = false; lM_24116_0_Children[lM_24116_0_Children.Length - 1].timeScale = 1f; lM_24116.children = lM_24116_0_Children; lM_24116.AddChild(m22442, new Vector2(0.7f, 0.7f)); UnityEditor.Animations.ChildMotion[] lM_24116_1_Children = lM_24116.children; lM_24116_1_Children[lM_24116_1_Children.Length - 1].mirror = false; lM_24116_1_Children[lM_24116_1_Children.Length - 1].timeScale = 1.1f; lM_24116.children = lM_24116_1_Children; lM_24116.AddChild(m22440, new Vector2(-0.7f, 0.7f)); UnityEditor.Animations.ChildMotion[] lM_24116_2_Children = lM_24116.children; lM_24116_2_Children[lM_24116_2_Children.Length - 1].mirror = false; lM_24116_2_Children[lM_24116_2_Children.Length - 1].timeScale = 1.1f; lM_24116.children = lM_24116_2_Children; lM_24116.AddChild(m22444, new Vector2(-0.7f, 0f)); UnityEditor.Animations.ChildMotion[] lM_24116_3_Children = lM_24116.children; lM_24116_3_Children[lM_24116_3_Children.Length - 1].mirror = false; lM_24116_3_Children[lM_24116_3_Children.Length - 1].timeScale = 1f; lM_24116.children = lM_24116_3_Children; lM_24116.AddChild(m22446, new Vector2(0.7f, 0f)); UnityEditor.Animations.ChildMotion[] lM_24116_4_Children = lM_24116.children; lM_24116_4_Children[lM_24116_4_Children.Length - 1].mirror = false; lM_24116_4_Children[lM_24116_4_Children.Length - 1].timeScale = 1f; lM_24116.children = lM_24116_4_Children; lM_24116.AddChild(m22436, new Vector2(-0.7f, -0.7f)); UnityEditor.Animations.ChildMotion[] lM_24116_5_Children = lM_24116.children; lM_24116_5_Children[lM_24116_5_Children.Length - 1].mirror = false; lM_24116_5_Children[lM_24116_5_Children.Length - 1].timeScale = 1.1f; lM_24116.children = lM_24116_5_Children; lM_24116.AddChild(m22438, new Vector2(0.7f, -0.7f)); UnityEditor.Animations.ChildMotion[] lM_24116_6_Children = lM_24116.children; lM_24116_6_Children[lM_24116_6_Children.Length - 1].mirror = false; lM_24116_6_Children[lM_24116_6_Children.Length - 1].timeScale = 1.1f; lM_24116.children = lM_24116_6_Children; lM_24116.AddChild(m18780, new Vector2(0f, -0.7f)); UnityEditor.Animations.ChildMotion[] lM_24116_7_Children = lM_24116.children; lM_24116_7_Children[lM_24116_7_Children.Length - 1].mirror = false; lM_24116_7_Children[lM_24116_7_Children.Length - 1].timeScale = 1f; lM_24116.children = lM_24116_7_Children; lM_24106.AddChild(lM_24116, 1f); lS_24896.motion = lM_24106; // Create the transition from the any state. Note that 'AnyState' transitions have to be added to the root UnityEditor.Animations.AnimatorStateTransition lT_24700 = lRootStateMachine.AddAnyStateTransition(lS_24896); lT_24700.hasExitTime = false; lT_24700.hasFixedDuration = true; lT_24700.exitTime = 0.9f; lT_24700.duration = 0.2f; lT_24700.offset = 0f; lT_24700.mute = false; lT_24700.solo = false; lT_24700.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 1130f, "L0MotionPhase"); UnityEditor.Animations.AnimatorStateTransition lT_25732 = lS_25730.AddTransition(lS_24896); lT_25732.hasExitTime = false; lT_25732.hasFixedDuration = true; lT_25732.exitTime = 0f; lT_25732.duration = 0.25f; lT_25732.offset = 0f; lT_25732.mute = false; lT_25732.solo = false; lT_25732.canTransitionToSelf = true; lT_25732.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Greater, 0.1f, "InputMagnitude"); UnityEditor.Animations.AnimatorStateTransition lT_25734 = lS_24896.AddTransition(lS_25730); lT_25734.hasExitTime = false; lT_25734.hasFixedDuration = true; lT_25734.exitTime = 1f; lT_25734.duration = 0.2f; lT_25734.offset = 0f; lT_25734.mute = false; lT_25734.solo = false; lT_25734.canTransitionToSelf = true; lT_25734.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 1135f, "L0MotionPhase"); lT_25734.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 0f, "L0MotionParameter"); }
/// <summary> /// Creates the animator substate machine for this motion. /// </summary> protected override void CreateStateMachine() { // Grab the root sm for the layer UnityEditor.Animations.AnimatorStateMachine lRootStateMachine = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lSM_23510 = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lRootSubStateMachine = null; // If we find the sm with our name, remove it for (int i = 0; i < lRootStateMachine.stateMachines.Length; i++) { // Look for a sm with the matching name if (lRootStateMachine.stateMachines[i].stateMachine.name == _EditorAnimatorSMName) { lRootSubStateMachine = lRootStateMachine.stateMachines[i].stateMachine; // Allow the user to stop before we remove the sm if (!UnityEditor.EditorUtility.DisplayDialog("Motion Controller", _EditorAnimatorSMName + " already exists. Delete and recreate it?", "Yes", "No")) { return; } // Remove the sm //lRootStateMachine.RemoveStateMachine(lRootStateMachine.stateMachines[i].stateMachine); break; } } UnityEditor.Animations.AnimatorStateMachine lSM_N25356 = lRootSubStateMachine; if (lSM_N25356 != null) { for (int i = lSM_N25356.entryTransitions.Length - 1; i >= 0; i--) { lSM_N25356.RemoveEntryTransition(lSM_N25356.entryTransitions[i]); } for (int i = lSM_N25356.anyStateTransitions.Length - 1; i >= 0; i--) { lSM_N25356.RemoveAnyStateTransition(lSM_N25356.anyStateTransitions[i]); } for (int i = lSM_N25356.states.Length - 1; i >= 0; i--) { lSM_N25356.RemoveState(lSM_N25356.states[i].state); } for (int i = lSM_N25356.stateMachines.Length - 1; i >= 0; i--) { lSM_N25356.RemoveStateMachine(lSM_N25356.stateMachines[i].stateMachine); } } else { lSM_N25356 = lSM_23510.AddStateMachine(_EditorAnimatorSMName, new Vector3(636, -84, 0)); } UnityEditor.Animations.AnimatorState lS_N25358 = lSM_N25356.AddState("run_to_dive", new Vector3(312, 132, 0)); lS_N25358.speed = 1f; lS_N25358.motion = m13726; UnityEditor.Animations.AnimatorState lS_N25360 = lSM_N25356.AddState("SwimIdlePose", new Vector3(576, 180, 0)); lS_N25360.speed = 1f; lS_N25360.motion = m17380; UnityEditor.Animations.AnimatorState lS_N25362 = lSM_N25356.AddState("StandingDive", new Vector3(312, 36, 0)); lS_N25362.speed = 1f; lS_N25362.motion = m18078; UnityEditor.Animations.AnimatorState lS_N25364 = lSM_N25356.AddState("TreadIdlePose", new Vector3(576, 96, 0)); lS_N25364.speed = 1f; lS_N25364.motion = m15640; // Create the transition from the any state. Note that 'AnyState' transitions have to be added to the root UnityEditor.Animations.AnimatorStateTransition lT_N25366 = lRootStateMachine.AddAnyStateTransition(lS_N25362); lT_N25366.hasExitTime = false; lT_N25366.hasFixedDuration = true; lT_N25366.exitTime = 0.9f; lT_N25366.duration = 0.1f; lT_N25366.offset = 0f; lT_N25366.mute = false; lT_N25366.solo = false; lT_N25366.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 31500f, "L0MotionPhase"); lT_N25366.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 0f, "L0MotionParameter"); // Create the transition from the any state. Note that 'AnyState' transitions have to be added to the root UnityEditor.Animations.AnimatorStateTransition lT_N25368 = lRootStateMachine.AddAnyStateTransition(lS_N25358); lT_N25368.hasExitTime = false; lT_N25368.hasFixedDuration = true; lT_N25368.exitTime = 0.9f; lT_N25368.duration = 0.1f; lT_N25368.offset = 0f; lT_N25368.mute = false; lT_N25368.solo = false; lT_N25368.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 31500f, "L0MotionPhase"); lT_N25368.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 1f, "L0MotionParameter"); UnityEditor.Animations.AnimatorStateTransition lT_N25370 = lS_N25358.AddTransition(lS_N25360); lT_N25370.hasExitTime = false; lT_N25370.hasFixedDuration = true; lT_N25370.exitTime = 0.8834254f; lT_N25370.duration = 0.25f; lT_N25370.offset = 0f; lT_N25370.mute = false; lT_N25370.solo = false; lT_N25370.canTransitionToSelf = true; lT_N25370.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 31501f, "L0MotionPhase"); lT_N25370.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Greater, 0.6f, "InputMagnitude"); UnityEditor.Animations.AnimatorStateTransition lT_N25372 = lS_N25358.AddTransition(lS_N25364); lT_N25372.hasExitTime = false; lT_N25372.hasFixedDuration = true; lT_N25372.exitTime = 0.7887324f; lT_N25372.duration = 0.5f; lT_N25372.offset = 0f; lT_N25372.mute = false; lT_N25372.solo = false; lT_N25372.canTransitionToSelf = true; lT_N25372.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 31501f, "L0MotionPhase"); lT_N25372.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Less, 0.6f, "InputMagnitude"); UnityEditor.Animations.AnimatorStateTransition lT_N25374 = lS_N25362.AddTransition(lS_N25358); lT_N25374.hasExitTime = true; lT_N25374.hasFixedDuration = true; lT_N25374.exitTime = 0.6953372f; lT_N25374.duration = 0.1499999f; lT_N25374.offset = 0.3380885f; lT_N25374.mute = false; lT_N25374.solo = false; lT_N25374.canTransitionToSelf = true; }
/// <summary> /// Creates the animator substate machine for this motion. /// </summary> protected override void CreateStateMachine() { // Grab the root sm for the layer UnityEditor.Animations.AnimatorStateMachine lRootStateMachine = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lSM_32610 = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lRootSubStateMachine = null; // If we find the sm with our name, remove it for (int i = 0; i < lRootStateMachine.stateMachines.Length; i++) { // Look for a sm with the matching name if (lRootStateMachine.stateMachines[i].stateMachine.name == _EditorAnimatorSMName) { lRootSubStateMachine = lRootStateMachine.stateMachines[i].stateMachine; // Allow the user to stop before we remove the sm if (!UnityEditor.EditorUtility.DisplayDialog("Motion Controller", _EditorAnimatorSMName + " already exists. Delete and recreate it?", "Yes", "No")) { return; } // Remove the sm //lRootStateMachine.RemoveStateMachine(lRootStateMachine.stateMachines[i].stateMachine); break; } } UnityEditor.Animations.AnimatorStateMachine lSM_33036 = lRootSubStateMachine; if (lSM_33036 != null) { for (int i = lSM_33036.entryTransitions.Length - 1; i >= 0; i--) { lSM_33036.RemoveEntryTransition(lSM_33036.entryTransitions[i]); } for (int i = lSM_33036.anyStateTransitions.Length - 1; i >= 0; i--) { lSM_33036.RemoveAnyStateTransition(lSM_33036.anyStateTransitions[i]); } for (int i = lSM_33036.states.Length - 1; i >= 0; i--) { lSM_33036.RemoveState(lSM_33036.states[i].state); } for (int i = lSM_33036.stateMachines.Length - 1; i >= 0; i--) { lSM_33036.RemoveStateMachine(lSM_33036.stateMachines[i].stateMachine); } } else { lSM_33036 = lSM_32610.AddStateMachine(_EditorAnimatorSMName, new Vector3(408, -420, 0)); } UnityEditor.Animations.AnimatorState lS_34708 = lSM_33036.AddState("IdlePose", new Vector3(840, 204, 0)); lS_34708.speed = 1f; lS_34708.motion = m17118; UnityEditor.Animations.AnimatorState lS_34710 = lSM_33036.AddState("RunJump_RunForward", new Vector3(588, 288, 0)); lS_34710.speed = 1f; lS_34710.motion = m17050; UnityEditor.Animations.AnimatorState lS_34426 = lSM_33036.AddState("RunningJump", new Vector3(324, 204, 0)); lS_34426.speed = 1f; lS_34426.motion = m22024; UnityEditor.Animations.AnimatorState lS_34712 = lSM_33036.AddState("LandToIdle", new Vector3(588, 204, 0)); lS_34712.speed = 1f; lS_34712.motion = m20978; // Create the transition from the any state. Note that 'AnyState' transitions have to be added to the root UnityEditor.Animations.AnimatorStateTransition lT_33112 = lRootStateMachine.AddAnyStateTransition(lS_34426); lT_33112.hasExitTime = false; lT_33112.hasFixedDuration = true; lT_33112.exitTime = 0.9f; lT_33112.duration = 0.05f; lT_33112.offset = 0f; lT_33112.mute = false; lT_33112.solo = false; lT_33112.canTransitionToSelf = true; lT_33112.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; lT_33112.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 27500f, "L0MotionPhase"); UnityEditor.Animations.AnimatorStateTransition lT_34716 = lS_34426.AddTransition(lS_34710); lT_34716.hasExitTime = false; lT_34716.hasFixedDuration = true; lT_34716.exitTime = 0.8318414f; lT_34716.duration = 0.1f; lT_34716.offset = 0.8475341f; lT_34716.mute = false; lT_34716.solo = false; lT_34716.canTransitionToSelf = true; lT_34716.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; lT_34716.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 27545f, "L0MotionPhase"); UnityEditor.Animations.AnimatorStateTransition lT_34718 = lS_34426.AddTransition(lS_34712); lT_34718.hasExitTime = false; lT_34718.hasFixedDuration = true; lT_34718.exitTime = 0.8032071f; lT_34718.duration = 0.1951104f; lT_34718.offset = 0f; lT_34718.mute = false; lT_34718.solo = false; lT_34718.canTransitionToSelf = true; lT_34718.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; lT_34718.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 27540f, "L0MotionPhase"); UnityEditor.Animations.AnimatorStateTransition lT_34720 = lS_34712.AddTransition(lS_34708); lT_34720.hasExitTime = true; lT_34720.hasFixedDuration = true; lT_34720.exitTime = 0.6590909f; lT_34720.duration = 0.25f; lT_34720.offset = 0f; lT_34720.mute = false; lT_34720.solo = false; lT_34720.canTransitionToSelf = true; lT_34720.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; }
/// <summary> /// Creates the animator substate machine for this motion. /// </summary> protected override void CreateStateMachine() { // Grab the root sm for the layer UnityEditor.Animations.AnimatorStateMachine lRootStateMachine = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lSM_23510 = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lRootSubStateMachine = null; // If we find the sm with our name, remove it for (int i = 0; i < lRootStateMachine.stateMachines.Length; i++) { // Look for a sm with the matching name if (lRootStateMachine.stateMachines[i].stateMachine.name == _EditorAnimatorSMName) { lRootSubStateMachine = lRootStateMachine.stateMachines[i].stateMachine; // Allow the user to stop before we remove the sm if (!UnityEditor.EditorUtility.DisplayDialog("Motion Controller", _EditorAnimatorSMName + " already exists. Delete and recreate it?", "Yes", "No")) { return; } // Remove the sm //lRootStateMachine.RemoveStateMachine(lRootStateMachine.stateMachines[i].stateMachine); break; } } UnityEditor.Animations.AnimatorStateMachine lSM_23512 = lRootSubStateMachine; if (lSM_23512 != null) { for (int i = lSM_23512.entryTransitions.Length - 1; i >= 0; i--) { lSM_23512.RemoveEntryTransition(lSM_23512.entryTransitions[i]); } for (int i = lSM_23512.anyStateTransitions.Length - 1; i >= 0; i--) { lSM_23512.RemoveAnyStateTransition(lSM_23512.anyStateTransitions[i]); } for (int i = lSM_23512.states.Length - 1; i >= 0; i--) { lSM_23512.RemoveState(lSM_23512.states[i].state); } for (int i = lSM_23512.stateMachines.Length - 1; i >= 0; i--) { lSM_23512.RemoveStateMachine(lSM_23512.stateMachines[i].stateMachine); } } else { lSM_23512 = lSM_23510.AddStateMachine(_EditorAnimatorSMName, new Vector3(408, -84, 0)); } UnityEditor.Animations.AnimatorState lS_N18490 = lSM_23512.AddState("TreadIdlePose", new Vector3(600, 72, 0)); lS_N18490.speed = 1f; lS_N18490.motion = m15640; UnityEditor.Animations.AnimatorState lS_N18492 = lSM_23512.AddState("Swim Tree", new Vector3(312, 120, 0)); lS_N18492.speed = 1f; UnityEditor.Animations.BlendTree lM_N18494 = CreateBlendTree("Swim Blend Tree", _EditorAnimatorController, mMotionLayer.AnimatorLayerIndex); lM_N18494.blendType = UnityEditor.Animations.BlendTreeType.Simple1D; lM_N18494.blendParameter = "InputMagnitude"; lM_N18494.blendParameterY = "InputX"; #if !(UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3) lM_N18494.useAutomaticThresholds = false; #endif lM_N18494.AddChild(m15642, 0f); UnityEditor.Animations.BlendTree lM_N18498 = CreateBlendTree("TreadTree", _EditorAnimatorController, mMotionLayer.AnimatorLayerIndex); lM_N18498.blendType = UnityEditor.Animations.BlendTreeType.SimpleDirectional2D; lM_N18498.blendParameter = "InputX"; lM_N18498.blendParameterY = "InputY"; #if !(UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3) lM_N18498.useAutomaticThresholds = true; #endif lM_N18498.AddChild(m15642, new Vector2(0f, 0.1f)); lM_N18498.AddChild(m15642, new Vector2(-0.1f, 0f)); lM_N18498.AddChild(m15642, new Vector2(0.1f, 0f)); lM_N18498.AddChild(m15642, new Vector2(0f, -0.1f)); lM_N18494.AddChild(lM_N18498, 0.5f); UnityEditor.Animations.BlendTree lM_N18502 = CreateBlendTree("SwimTree", _EditorAnimatorController, mMotionLayer.AnimatorLayerIndex); lM_N18502.blendType = UnityEditor.Animations.BlendTreeType.SimpleDirectional2D; lM_N18502.blendParameter = "InputX"; lM_N18502.blendParameterY = "InputY"; #if !(UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3) lM_N18502.useAutomaticThresholds = true; #endif lM_N18502.AddChild(m17384, new Vector2(0f, 0.1f)); lM_N18502.AddChild(m17382, new Vector2(-0.1f, 0f)); lM_N18502.AddChild(m17386, new Vector2(0.1f, 0f)); lM_N18502.AddChild(m15642, new Vector2(0f, -0.1f)); lM_N18494.AddChild(lM_N18502, 1f); lS_N18492.motion = lM_N18494; UnityEditor.Animations.AnimatorState lS_N18506 = lSM_23512.AddState("IdlePose", new Vector3(600, 156, 0)); lS_N18506.speed = 1f; lS_N18506.motion = m14222; // Create the transition from the any state. Note that 'AnyState' transitions have to be added to the root UnityEditor.Animations.AnimatorStateTransition lT_N18508 = lRootStateMachine.AddAnyStateTransition(lS_N18492); lT_N18508.hasExitTime = false; lT_N18508.hasFixedDuration = true; lT_N18508.exitTime = 0.9f; lT_N18508.duration = 0.4f; lT_N18508.offset = 0f; lT_N18508.mute = false; lT_N18508.solo = false; lT_N18508.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 31400f, "L0MotionPhase"); UnityEditor.Animations.AnimatorStateTransition lT_N18510 = lS_N18490.AddTransition(lS_N18492); lT_N18510.hasExitTime = false; lT_N18510.hasFixedDuration = true; lT_N18510.exitTime = 0f; lT_N18510.duration = 0.2f; lT_N18510.offset = 0f; lT_N18510.mute = false; lT_N18510.solo = false; lT_N18510.canTransitionToSelf = true; lT_N18510.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Greater, 0.1f, "InputMagnitude"); UnityEditor.Animations.AnimatorStateTransition lT_N18512 = lS_N18492.AddTransition(lS_N18490); lT_N18512.hasExitTime = false; lT_N18512.hasFixedDuration = true; lT_N18512.exitTime = 1f; lT_N18512.duration = 0.3f; lT_N18512.offset = 0f; lT_N18512.mute = false; lT_N18512.solo = false; lT_N18512.canTransitionToSelf = true; lT_N18512.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 31405f, "L0MotionPhase"); lT_N18512.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 0f, "L0MotionParameter"); UnityEditor.Animations.AnimatorStateTransition lT_N18514 = lS_N18492.AddTransition(lS_N18506); lT_N18514.hasExitTime = false; lT_N18514.hasFixedDuration = true; lT_N18514.exitTime = 0.9286847f; lT_N18514.duration = 0.25f; lT_N18514.offset = 0f; lT_N18514.mute = false; lT_N18514.solo = false; lT_N18514.canTransitionToSelf = true; lT_N18514.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 31406f, "L0MotionPhase"); }
/// <summary> /// Creates the animator substate machine for this motion. /// </summary> protected override void CreateStateMachine() { // Grab the root sm for the layer UnityEditor.Animations.AnimatorStateMachine lRootStateMachine = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lSM_23510 = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lRootSubStateMachine = null; // If we find the sm with our name, remove it for (int i = 0; i < lRootStateMachine.stateMachines.Length; i++) { // Look for a sm with the matching name if (lRootStateMachine.stateMachines[i].stateMachine.name == _EditorAnimatorSMName) { lRootSubStateMachine = lRootStateMachine.stateMachines[i].stateMachine; // Allow the user to stop before we remove the sm if (!UnityEditor.EditorUtility.DisplayDialog("Motion Controller", _EditorAnimatorSMName + " already exists. Delete and recreate it?", "Yes", "No")) { return; } // Remove the sm //lRootStateMachine.RemoveStateMachine(lRootStateMachine.stateMachines[i].stateMachine); break; } } UnityEditor.Animations.AnimatorStateMachine lSM_23572 = lRootSubStateMachine; if (lSM_23572 != null) { for (int i = lSM_23572.entryTransitions.Length - 1; i >= 0; i--) { lSM_23572.RemoveEntryTransition(lSM_23572.entryTransitions[i]); } for (int i = lSM_23572.anyStateTransitions.Length - 1; i >= 0; i--) { lSM_23572.RemoveAnyStateTransition(lSM_23572.anyStateTransitions[i]); } for (int i = lSM_23572.states.Length - 1; i >= 0; i--) { lSM_23572.RemoveState(lSM_23572.states[i].state); } for (int i = lSM_23572.stateMachines.Length - 1; i >= 0; i--) { lSM_23572.RemoveStateMachine(lSM_23572.stateMachines[i].stateMachine); } } else { lSM_23572 = lSM_23510.AddStateMachine(_EditorAnimatorSMName, new Vector3(192, -36, 0)); } UnityEditor.Animations.AnimatorState lS_24640 = lSM_23572.AddState("IdlePose", new Vector3(564, -12, 0)); lS_24640.speed = 1f; lS_24640.motion = m14222; UnityEditor.Animations.AnimatorState lS_23796 = lSM_23572.AddState("SwimEdgeExit", new Vector3(216, -12, 0)); lS_23796.speed = 1f; lS_23796.motion = m10496; UnityEditor.Animations.AnimatorState lS_24642 = lSM_23572.AddState("crouched_to_standing", new Vector3(564, 60, 0)); lS_24642.speed = 0.75f; lS_24642.motion = m17174; UnityEditor.Animations.AnimatorState lS_24644 = lSM_23572.AddState("braced_hang_to_crouch", new Vector3(300, 60, 0)); lS_24644.speed = 0.75f; lS_24644.motion = m19706; UnityEditor.Animations.AnimatorState lS_23798 = lSM_23572.AddState("TreadIdlePose", new Vector3(216, 144, 0)); lS_23798.speed = 1f; lS_23798.motion = m15640; UnityEditor.Animations.AnimatorState lS_23800 = lSM_23572.AddState("TreadIdleExitPose", new Vector3(216, 204, 0)); lS_23800.speed = 1f; lS_23800.motion = m15640; // Create the transition from the any state. Note that 'AnyState' transitions have to be added to the root UnityEditor.Animations.AnimatorStateTransition lT_23682 = lRootStateMachine.AddAnyStateTransition(lS_23796); lT_23682.hasExitTime = false; lT_23682.hasFixedDuration = true; lT_23682.exitTime = 0.9f; lT_23682.duration = 0.1f; lT_23682.offset = 0f; lT_23682.mute = false; lT_23682.solo = false; lT_23682.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 31600f, "L0MotionPhase"); lT_23682.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 1f, "L0MotionParameter"); // Create the transition from the any state. Note that 'AnyState' transitions have to be added to the root UnityEditor.Animations.AnimatorStateTransition lT_23684 = lRootStateMachine.AddAnyStateTransition(lS_23798); lT_23684.hasExitTime = false; lT_23684.hasFixedDuration = true; lT_23684.exitTime = 0.9f; lT_23684.duration = 0.1f; lT_23684.offset = 0f; lT_23684.mute = false; lT_23684.solo = false; lT_23684.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 31600f, "L0MotionPhase"); lT_23684.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 0f, "L0MotionParameter"); // Create the transition from the any state. Note that 'AnyState' transitions have to be added to the root UnityEditor.Animations.AnimatorStateTransition lT_23686 = lRootStateMachine.AddAnyStateTransition(lS_23800); lT_23686.hasExitTime = false; lT_23686.hasFixedDuration = true; lT_23686.exitTime = 0.9f; lT_23686.duration = 0.3f; lT_23686.offset = 0f; lT_23686.mute = false; lT_23686.solo = false; lT_23686.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 31601f, "L0MotionPhase"); UnityEditor.Animations.AnimatorStateTransition lT_24646 = lS_23796.AddTransition(lS_24644); lT_24646.hasExitTime = true; lT_24646.hasFixedDuration = true; lT_24646.exitTime = 0.3347696f; lT_24646.duration = 0.4852898f; lT_24646.offset = 0f; lT_24646.mute = false; lT_24646.solo = false; lT_24646.canTransitionToSelf = true; UnityEditor.Animations.AnimatorStateTransition lT_24648 = lS_24642.AddTransition(lS_24640); lT_24648.hasExitTime = true; lT_24648.hasFixedDuration = true; lT_24648.exitTime = 0.7064211f; lT_24648.duration = 0.25f; lT_24648.offset = 0f; lT_24648.mute = false; lT_24648.solo = false; lT_24648.canTransitionToSelf = true; UnityEditor.Animations.AnimatorStateTransition lT_24650 = lS_24644.AddTransition(lS_24642); lT_24650.hasExitTime = true; lT_24650.hasFixedDuration = true; lT_24650.exitTime = 0.9f; lT_24650.duration = 0.1f; lT_24650.offset = 0f; lT_24650.mute = false; lT_24650.solo = false; lT_24650.canTransitionToSelf = true; UnityEditor.Animations.AnimatorStateTransition lT_24652 = lS_23798.AddTransition(lS_24644); lT_24652.hasExitTime = true; lT_24652.hasFixedDuration = true; lT_24652.exitTime = 0f; lT_24652.duration = 0.25f; lT_24652.offset = 0f; lT_24652.mute = false; lT_24652.solo = false; lT_24652.canTransitionToSelf = true; }
/// <summary> /// Creates the animator substate machine for this motion. /// </summary> protected override void CreateStateMachine() { // Grab the root sm for the layer UnityEditor.Animations.AnimatorStateMachine lRootStateMachine = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lSM_38592 = _EditorAnimatorController.layers[mMotionLayer.AnimatorLayerIndex].stateMachine; UnityEditor.Animations.AnimatorStateMachine lRootSubStateMachine = null; // If we find the sm with our name, remove it for (int i = 0; i < lRootStateMachine.stateMachines.Length; i++) { // Look for a sm with the matching name if (lRootStateMachine.stateMachines[i].stateMachine.name == _EditorAnimatorSMName) { lRootSubStateMachine = lRootStateMachine.stateMachines[i].stateMachine; // Allow the user to stop before we remove the sm if (!UnityEditor.EditorUtility.DisplayDialog("Motion Controller", _EditorAnimatorSMName + " already exists. Delete and recreate it?", "Yes", "No")) { return; } // Remove the sm //lRootStateMachine.RemoveStateMachine(lRootStateMachine.stateMachines[i].stateMachine); break; } } UnityEditor.Animations.AnimatorStateMachine lSM_38604 = lRootSubStateMachine; if (lSM_38604 != null) { for (int i = lSM_38604.entryTransitions.Length - 1; i >= 0; i--) { lSM_38604.RemoveEntryTransition(lSM_38604.entryTransitions[i]); } for (int i = lSM_38604.anyStateTransitions.Length - 1; i >= 0; i--) { lSM_38604.RemoveAnyStateTransition(lSM_38604.anyStateTransitions[i]); } for (int i = lSM_38604.states.Length - 1; i >= 0; i--) { lSM_38604.RemoveState(lSM_38604.states[i].state); } for (int i = lSM_38604.stateMachines.Length - 1; i >= 0; i--) { lSM_38604.RemoveStateMachine(lSM_38604.stateMachines[i].stateMachine); } } else { lSM_38604 = lSM_38592.AddStateMachine(_EditorAnimatorSMName, new Vector3(624, 264, 0)); } UnityEditor.Animations.AnimatorState lS_38960 = lSM_38604.AddState("Move Tree", new Vector3(192, 216, 0)); lS_38960.speed = 1f; UnityEditor.Animations.BlendTree lM_14838 = CreateBlendTree("Move Blend Tree", _EditorAnimatorController, mMotionLayer.AnimatorLayerIndex); lM_14838.blendType = UnityEditor.Animations.BlendTreeType.Simple1D; lM_14838.blendParameter = "InputMagnitude"; lM_14838.blendParameterY = "InputX"; #if !(UNITY_4_0 || UNITY_4_0_1 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3) lM_14838.useAutomaticThresholds = false; #endif lM_14838.AddChild(m17768, 0f); lM_14838.AddChild(m17768, 0.5f); lM_14838.AddChild(m16640, 1f); lS_38960.motion = lM_14838; UnityEditor.Animations.AnimatorState lS_39156 = lSM_38604.AddState("IdlePose", new Vector3(492, 216, 0)); lS_39156.speed = 1f; lS_39156.motion = m19780; // Create the transition from the any state. Note that 'AnyState' transitions have to be added to the root UnityEditor.Animations.AnimatorStateTransition lT_38780 = lRootStateMachine.AddAnyStateTransition(lS_38960); lT_38780.hasExitTime = false; lT_38780.hasFixedDuration = true; lT_38780.exitTime = 0.9f; lT_38780.duration = 0.2f; lT_38780.offset = 0f; lT_38780.mute = false; lT_38780.solo = false; lT_38780.canTransitionToSelf = false; lT_38780.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; lT_38780.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 32200f, "L0MotionPhase"); lT_38780.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 0f, "L0MotionParameter"); UnityEditor.Animations.AnimatorStateTransition lT_39166 = lS_38960.AddTransition(lS_39156); lT_39166.hasExitTime = false; lT_39166.hasFixedDuration = true; lT_39166.exitTime = 0.7383721f; lT_39166.duration = 0.15f; lT_39166.offset = 0f; lT_39166.mute = false; lT_39166.solo = false; lT_39166.canTransitionToSelf = true; lT_39166.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; lT_39166.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Equals, 32201f, "L0MotionPhase"); UnityEditor.Animations.AnimatorStateTransition lT_39190 = lS_39156.AddTransition(lS_38960); lT_39190.hasExitTime = false; lT_39190.hasFixedDuration = true; lT_39190.exitTime = 0f; lT_39190.duration = 0.1f; lT_39190.offset = 0f; lT_39190.mute = false; lT_39190.solo = false; lT_39190.canTransitionToSelf = true; lT_39190.interruptionSource = (UnityEditor.Animations.TransitionInterruptionSource) 0; lT_39190.AddCondition(UnityEditor.Animations.AnimatorConditionMode.Greater, 0.2f, "InputMagnitude"); }