lvjincheng 4 роки тому
батько
коміт
c19e5b5bc0

+ 526 - 0
Assets/ArtAsset/Hunter/Models/Yeji/Yeji.controller

@@ -0,0 +1,526 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1107 &-8754338883370367664
+AnimatorStateMachine:
+  serializedVersion: 6
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: Base Layer
+  m_ChildStates:
+  - serializedVersion: 1
+    m_State: {fileID: 5686301840197236353}
+    m_Position: {x: 130, y: -90, z: 0}
+  - serializedVersion: 1
+    m_State: {fileID: -4937633972306135622}
+    m_Position: {x: 350, y: 50, z: 0}
+  - serializedVersion: 1
+    m_State: {fileID: -328081215642712104}
+    m_Position: {x: 530, y: 140, z: 0}
+  - serializedVersion: 1
+    m_State: {fileID: 3799707472407412069}
+    m_Position: {x: 620, y: 230, z: 0}
+  - serializedVersion: 1
+    m_State: {fileID: 8828921775377928178}
+    m_Position: {x: 180, y: 230, z: 0}
+  - serializedVersion: 1
+    m_State: {fileID: 4426716494157268833}
+    m_Position: {x: 260, y: 140, z: 0}
+  - serializedVersion: 1
+    m_State: {fileID: 1951952489111045495}
+    m_Position: {x: 400, y: 350, z: 0}
+  - serializedVersion: 1
+    m_State: {fileID: -7251307044565088861}
+    m_Position: {x: -90, y: -90, z: 0}
+  m_ChildStateMachines: []
+  m_AnyStateTransitions:
+  - {fileID: -5445394349210823807}
+  - {fileID: -3637255472292364779}
+  m_EntryTransitions: []
+  m_StateMachineTransitions: {}
+  m_StateMachineBehaviours: []
+  m_AnyStatePosition: {x: 50, y: 20, z: 0}
+  m_EntryPosition: {x: 50, y: 120, z: 0}
+  m_ExitPosition: {x: 800, y: 120, z: 0}
+  m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
+  m_DefaultState: {fileID: -4937633972306135622}
+--- !u!1102 &-7251307044565088861
+AnimatorState:
+  serializedVersion: 6
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: DeadOnSky
+  m_Speed: 1
+  m_CycleOffset: 0
+  m_Transitions: []
+  m_StateMachineBehaviours: []
+  m_Position: {x: 50, y: 50, z: 0}
+  m_IKOnFeet: 0
+  m_WriteDefaultValues: 1
+  m_Mirror: 0
+  m_SpeedParameterActive: 0
+  m_MirrorParameterActive: 0
+  m_CycleOffsetParameterActive: 0
+  m_TimeParameterActive: 0
+  m_Motion: {fileID: 102799392929370657, guid: 93970f0540b5a0541897b3f8253023b8, type: 3}
+  m_Tag: 
+  m_SpeedParameter: 
+  m_MirrorParameter: 
+  m_CycleOffsetParameter: 
+  m_TimeParameter: 
+--- !u!1101 &-5445394349210823807
+AnimatorStateTransition:
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: 
+  m_Conditions:
+  - m_ConditionMode: 1
+    m_ConditionEvent: dead
+    m_EventTreshold: 0
+  - m_ConditionMode: 1
+    m_ConditionEvent: landing
+    m_EventTreshold: 0
+  m_DstStateMachine: {fileID: 0}
+  m_DstState: {fileID: 5686301840197236353}
+  m_Solo: 0
+  m_Mute: 0
+  m_IsExit: 0
+  serializedVersion: 3
+  m_TransitionDuration: 0.25
+  m_TransitionOffset: 0
+  m_ExitTime: 0.75
+  m_HasExitTime: 0
+  m_HasFixedDuration: 1
+  m_InterruptionSource: 0
+  m_OrderedInterruption: 1
+  m_CanTransitionToSelf: 0
+--- !u!1102 &-4937633972306135622
+AnimatorState:
+  serializedVersion: 6
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: Fly
+  m_Speed: 1
+  m_CycleOffset: 0
+  m_Transitions:
+  - {fileID: 7718128433457918227}
+  m_StateMachineBehaviours: []
+  m_Position: {x: 50, y: 50, z: 0}
+  m_IKOnFeet: 0
+  m_WriteDefaultValues: 1
+  m_Mirror: 0
+  m_SpeedParameterActive: 0
+  m_MirrorParameterActive: 0
+  m_CycleOffsetParameterActive: 0
+  m_TimeParameterActive: 0
+  m_Motion: {fileID: 1827226128182048838, guid: 93970f0540b5a0541897b3f8253023b8, type: 3}
+  m_Tag: 
+  m_SpeedParameter: 
+  m_MirrorParameter: 
+  m_CycleOffsetParameter: 
+  m_TimeParameter: 
+--- !u!1101 &-3637255472292364779
+AnimatorStateTransition:
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: 
+  m_Conditions:
+  - m_ConditionMode: 1
+    m_ConditionEvent: dead
+    m_EventTreshold: 0
+  - m_ConditionMode: 1
+    m_ConditionEvent: flying
+    m_EventTreshold: 0
+  m_DstStateMachine: {fileID: 0}
+  m_DstState: {fileID: -7251307044565088861}
+  m_Solo: 0
+  m_Mute: 0
+  m_IsExit: 0
+  serializedVersion: 3
+  m_TransitionDuration: 0.31344312
+  m_TransitionOffset: 0.04949104
+  m_ExitTime: 0.68113756
+  m_HasExitTime: 0
+  m_HasFixedDuration: 1
+  m_InterruptionSource: 0
+  m_OrderedInterruption: 1
+  m_CanTransitionToSelf: 0
+--- !u!1101 &-3121530670918686303
+AnimatorStateTransition:
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: 
+  m_Conditions:
+  - m_ConditionMode: 1
+    m_ConditionEvent: down
+    m_EventTreshold: 0
+  - m_ConditionMode: 1
+    m_ConditionEvent: landing
+    m_EventTreshold: 0
+  m_DstStateMachine: {fileID: 0}
+  m_DstState: {fileID: 3799707472407412069}
+  m_Solo: 0
+  m_Mute: 0
+  m_IsExit: 0
+  serializedVersion: 3
+  m_TransitionDuration: 0.25
+  m_TransitionOffset: 0
+  m_ExitTime: 0.75
+  m_HasExitTime: 0
+  m_HasFixedDuration: 1
+  m_InterruptionSource: 0
+  m_OrderedInterruption: 1
+  m_CanTransitionToSelf: 1
+--- !u!1101 &-2011368225657688237
+AnimatorStateTransition:
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: 
+  m_Conditions:
+  - m_ConditionMode: 2
+    m_ConditionEvent: up
+    m_EventTreshold: 0
+  - m_ConditionMode: 1
+    m_ConditionEvent: flying
+    m_EventTreshold: 0
+  m_DstStateMachine: {fileID: 0}
+  m_DstState: {fileID: -4937633972306135622}
+  m_Solo: 0
+  m_Mute: 0
+  m_IsExit: 0
+  serializedVersion: 3
+  m_TransitionDuration: 0.25
+  m_TransitionOffset: 0
+  m_ExitTime: 0.75
+  m_HasExitTime: 0
+  m_HasFixedDuration: 1
+  m_InterruptionSource: 0
+  m_OrderedInterruption: 1
+  m_CanTransitionToSelf: 1
+--- !u!1101 &-1437251969002981623
+AnimatorStateTransition:
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: 
+  m_Conditions:
+  - m_ConditionMode: 2
+    m_ConditionEvent: landing
+    m_EventTreshold: 0
+  m_DstStateMachine: {fileID: 0}
+  m_DstState: {fileID: 8828921775377928178}
+  m_Solo: 0
+  m_Mute: 0
+  m_IsExit: 0
+  serializedVersion: 3
+  m_TransitionDuration: 0.25
+  m_TransitionOffset: 0
+  m_ExitTime: 0.75
+  m_HasExitTime: 0
+  m_HasFixedDuration: 1
+  m_InterruptionSource: 0
+  m_OrderedInterruption: 1
+  m_CanTransitionToSelf: 1
+--- !u!1102 &-328081215642712104
+AnimatorState:
+  serializedVersion: 6
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: FlyDown
+  m_Speed: 1
+  m_CycleOffset: 0
+  m_Transitions:
+  - {fileID: -3121530670918686303}
+  m_StateMachineBehaviours: []
+  m_Position: {x: 50, y: 50, z: 0}
+  m_IKOnFeet: 0
+  m_WriteDefaultValues: 1
+  m_Mirror: 0
+  m_SpeedParameterActive: 0
+  m_MirrorParameterActive: 0
+  m_CycleOffsetParameterActive: 0
+  m_TimeParameterActive: 0
+  m_Motion: {fileID: -8095383451768056111, guid: 93970f0540b5a0541897b3f8253023b8, type: 3}
+  m_Tag: 
+  m_SpeedParameter: 
+  m_MirrorParameter: 
+  m_CycleOffsetParameter: 
+  m_TimeParameter: 
+--- !u!91 &9100000
+AnimatorController:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: Yeji
+  serializedVersion: 5
+  m_AnimatorParameters:
+  - m_Name: dead
+    m_Type: 4
+    m_DefaultFloat: 0
+    m_DefaultInt: 0
+    m_DefaultBool: 0
+    m_Controller: {fileID: 9100000}
+  - m_Name: down
+    m_Type: 4
+    m_DefaultFloat: 0
+    m_DefaultInt: 0
+    m_DefaultBool: 0
+    m_Controller: {fileID: 9100000}
+  - m_Name: landing
+    m_Type: 4
+    m_DefaultFloat: 0
+    m_DefaultInt: 0
+    m_DefaultBool: 0
+    m_Controller: {fileID: 9100000}
+  - m_Name: up
+    m_Type: 4
+    m_DefaultFloat: 0
+    m_DefaultInt: 0
+    m_DefaultBool: 0
+    m_Controller: {fileID: 9100000}
+  - m_Name: flying
+    m_Type: 4
+    m_DefaultFloat: 0
+    m_DefaultInt: 0
+    m_DefaultBool: 0
+    m_Controller: {fileID: 9100000}
+  m_AnimatorLayers:
+  - serializedVersion: 5
+    m_Name: Base Layer
+    m_StateMachine: {fileID: -8754338883370367664}
+    m_Mask: {fileID: 0}
+    m_Motions: []
+    m_Behaviours: []
+    m_BlendingMode: 0
+    m_SyncedLayerIndex: -1
+    m_DefaultWeight: 0
+    m_IKPass: 0
+    m_SyncedLayerAffectsTiming: 0
+    m_Controller: {fileID: 9100000}
+--- !u!1102 &1951952489111045495
+AnimatorState:
+  serializedVersion: 6
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: IdleOnGround2
+  m_Speed: 1
+  m_CycleOffset: 0
+  m_Transitions: []
+  m_StateMachineBehaviours: []
+  m_Position: {x: 50, y: 50, z: 0}
+  m_IKOnFeet: 0
+  m_WriteDefaultValues: 1
+  m_Mirror: 0
+  m_SpeedParameterActive: 0
+  m_MirrorParameterActive: 0
+  m_CycleOffsetParameterActive: 0
+  m_TimeParameterActive: 0
+  m_Motion: {fileID: -453082715539755137, guid: 93970f0540b5a0541897b3f8253023b8, type: 3}
+  m_Tag: 
+  m_SpeedParameter: 
+  m_MirrorParameter: 
+  m_CycleOffsetParameter: 
+  m_TimeParameter: 
+--- !u!1101 &3423863513589064057
+AnimatorStateTransition:
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: 
+  m_Conditions: []
+  m_DstStateMachine: {fileID: 0}
+  m_DstState: {fileID: 1951952489111045495}
+  m_Solo: 0
+  m_Mute: 0
+  m_IsExit: 0
+  serializedVersion: 3
+  m_TransitionDuration: 0.25
+  m_TransitionOffset: 0
+  m_ExitTime: 0.7500005
+  m_HasExitTime: 1
+  m_HasFixedDuration: 1
+  m_InterruptionSource: 0
+  m_OrderedInterruption: 1
+  m_CanTransitionToSelf: 1
+--- !u!1102 &3799707472407412069
+AnimatorState:
+  serializedVersion: 6
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: LandOnGround
+  m_Speed: 1
+  m_CycleOffset: 0
+  m_Transitions: []
+  m_StateMachineBehaviours: []
+  m_Position: {x: 50, y: 50, z: 0}
+  m_IKOnFeet: 0
+  m_WriteDefaultValues: 1
+  m_Mirror: 0
+  m_SpeedParameterActive: 0
+  m_MirrorParameterActive: 0
+  m_CycleOffsetParameterActive: 0
+  m_TimeParameterActive: 0
+  m_Motion: {fileID: -8049138343654836781, guid: 93970f0540b5a0541897b3f8253023b8, type: 3}
+  m_Tag: 
+  m_SpeedParameter: 
+  m_MirrorParameter: 
+  m_CycleOffsetParameter: 
+  m_TimeParameter: 
+--- !u!1102 &4426716494157268833
+AnimatorState:
+  serializedVersion: 6
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: FlyUp
+  m_Speed: 1
+  m_CycleOffset: 0
+  m_Transitions:
+  - {fileID: -2011368225657688237}
+  m_StateMachineBehaviours: []
+  m_Position: {x: 50, y: 50, z: 0}
+  m_IKOnFeet: 0
+  m_WriteDefaultValues: 1
+  m_Mirror: 0
+  m_SpeedParameterActive: 0
+  m_MirrorParameterActive: 0
+  m_CycleOffsetParameterActive: 0
+  m_TimeParameterActive: 0
+  m_Motion: {fileID: -7486656146155331730, guid: 93970f0540b5a0541897b3f8253023b8, type: 3}
+  m_Tag: 
+  m_SpeedParameter: 
+  m_MirrorParameter: 
+  m_CycleOffsetParameter: 
+  m_TimeParameter: 
+--- !u!1101 &5327791888832811650
+AnimatorStateTransition:
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: 
+  m_Conditions:
+  - m_ConditionMode: 1
+    m_ConditionEvent: up
+    m_EventTreshold: 0
+  - m_ConditionMode: 1
+    m_ConditionEvent: flying
+    m_EventTreshold: 0
+  m_DstStateMachine: {fileID: 0}
+  m_DstState: {fileID: 4426716494157268833}
+  m_Solo: 0
+  m_Mute: 0
+  m_IsExit: 0
+  serializedVersion: 3
+  m_TransitionDuration: 0.25
+  m_TransitionOffset: 0
+  m_ExitTime: 0.75
+  m_HasExitTime: 0
+  m_HasFixedDuration: 1
+  m_InterruptionSource: 0
+  m_OrderedInterruption: 1
+  m_CanTransitionToSelf: 1
+--- !u!1102 &5686301840197236353
+AnimatorState:
+  serializedVersion: 6
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: DeadOnGround
+  m_Speed: 1
+  m_CycleOffset: 0
+  m_Transitions: []
+  m_StateMachineBehaviours: []
+  m_Position: {x: 50, y: 50, z: 0}
+  m_IKOnFeet: 0
+  m_WriteDefaultValues: 1
+  m_Mirror: 0
+  m_SpeedParameterActive: 0
+  m_MirrorParameterActive: 0
+  m_CycleOffsetParameterActive: 0
+  m_TimeParameterActive: 0
+  m_Motion: {fileID: -2897470634551686762, guid: 93970f0540b5a0541897b3f8253023b8, type: 3}
+  m_Tag: 
+  m_SpeedParameter: 
+  m_MirrorParameter: 
+  m_CycleOffsetParameter: 
+  m_TimeParameter: 
+--- !u!1101 &7718128433457918227
+AnimatorStateTransition:
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: 
+  m_Conditions:
+  - m_ConditionMode: 1
+    m_ConditionEvent: down
+    m_EventTreshold: 0
+  - m_ConditionMode: 1
+    m_ConditionEvent: flying
+    m_EventTreshold: 0
+  m_DstStateMachine: {fileID: 0}
+  m_DstState: {fileID: -328081215642712104}
+  m_Solo: 0
+  m_Mute: 0
+  m_IsExit: 0
+  serializedVersion: 3
+  m_TransitionDuration: 0.25
+  m_TransitionOffset: 0
+  m_ExitTime: 0.75
+  m_HasExitTime: 0
+  m_HasFixedDuration: 1
+  m_InterruptionSource: 0
+  m_OrderedInterruption: 1
+  m_CanTransitionToSelf: 1
+--- !u!1102 &8828921775377928178
+AnimatorState:
+  serializedVersion: 6
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: FlyFromGround
+  m_Speed: 1
+  m_CycleOffset: 0
+  m_Transitions:
+  - {fileID: 5327791888832811650}
+  m_StateMachineBehaviours: []
+  m_Position: {x: 50, y: 50, z: 0}
+  m_IKOnFeet: 0
+  m_WriteDefaultValues: 1
+  m_Mirror: 0
+  m_SpeedParameterActive: 0
+  m_MirrorParameterActive: 0
+  m_CycleOffsetParameterActive: 0
+  m_TimeParameterActive: 0
+  m_Motion: {fileID: 1648332560449288537, guid: 93970f0540b5a0541897b3f8253023b8, type: 3}
+  m_Tag: 
+  m_SpeedParameter: 
+  m_MirrorParameter: 
+  m_CycleOffsetParameter: 
+  m_TimeParameter: 

+ 8 - 0
Assets/ArtAsset/Hunter/Models/Yeji/Yeji.controller.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: dc5f84257ea32854f92692efafeffb6d
+NativeFormatImporter:
+  externalObjects: {}
+  mainObjectFileID: 9100000
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 6 - 6
Assets/ArtAsset/Hunter/Models/Yeji/Yeji.fbx.meta

@@ -76,7 +76,7 @@ ModelImporter:
     animationDoRetargetingWarnings: 0
     importAnimatedCustomProperties: 0
     importConstraints: 0
-    animationCompression: 1
+    animationCompression: 3
     animationRotationError: 0.5
     animationPositionError: 0.5
     animationScaleError: 0.5
@@ -96,7 +96,7 @@ ModelImporter:
       cycleOffset: 0
       loop: 0
       hasAdditiveReferencePose: 0
-      loopTime: 0
+      loopTime: 1
       loopBlend: 0
       loopBlendOrientation: 0
       loopBlendPositionY: 0
@@ -125,7 +125,7 @@ ModelImporter:
       cycleOffset: 0
       loop: 0
       hasAdditiveReferencePose: 0
-      loopTime: 0
+      loopTime: 1
       loopBlend: 0
       loopBlendOrientation: 0
       loopBlendPositionY: 0
@@ -154,7 +154,7 @@ ModelImporter:
       cycleOffset: 0
       loop: 0
       hasAdditiveReferencePose: 0
-      loopTime: 0
+      loopTime: 1
       loopBlend: 0
       loopBlendOrientation: 0
       loopBlendPositionY: 0
@@ -386,7 +386,7 @@ ModelImporter:
       cycleOffset: 0
       loop: 0
       hasAdditiveReferencePose: 0
-      loopTime: 0
+      loopTime: 1
       loopBlend: 0
       loopBlendOrientation: 0
       loopBlendPositionY: 0
@@ -609,7 +609,7 @@ ModelImporter:
     skeletonHasParents: 1
   lastHumanDescriptionAvatarSource: {instanceID: 0}
   autoGenerateAvatarMappingIfUnspecified: 1
-  animationType: 1
+  animationType: 2
   humanoidOversampling: 1
   avatarSetup: 0
   addHumanoidExtraRootOnlyWhenUsingAvatar: 1

+ 21 - 34
Assets/ArtAsset/Hunter/Models/Yeji/Yeji.prefab

@@ -703,10 +703,9 @@ GameObject:
   serializedVersion: 6
   m_Component:
   - component: {fileID: 4165636056609648086}
-  - component: {fileID: 4487263707306101248}
-  - component: {fileID: 919132149545680525}
   - component: {fileID: 919132149545680526}
   - component: {fileID: 919132149545680527}
+  - component: {fileID: 7737104438608917870}
   m_Layer: 0
   m_Name: Yeji
   m_TagString: Untagged
@@ -729,37 +728,6 @@ Transform:
   m_Father: {fileID: 0}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!111 &4487263707306101248
-Animation:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 3640209499596699500}
-  m_Enabled: 1
-  serializedVersion: 3
-  m_Animation: {fileID: 0}
-  m_Animations:
-  - {fileID: 1827226128182048838, guid: 93970f0540b5a0541897b3f8253023b8, type: 3}
-  - {fileID: 102799392929370657, guid: 93970f0540b5a0541897b3f8253023b8, type: 3}
-  - {fileID: -7324256869210315399, guid: 93970f0540b5a0541897b3f8253023b8, type: 3}
-  m_WrapMode: 0
-  m_PlayAutomatically: 1
-  m_AnimatePhysics: 0
-  m_CullingType: 0
---- !u!114 &919132149545680525
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 3640209499596699500}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 399f902155403114494ee4b7cb30a483, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  speed: 1
 --- !u!195 &919132149545680526
 NavMeshAgent:
   m_ObjectHideFlags: 0
@@ -781,7 +749,7 @@ NavMeshAgent:
   m_Height: 0.44
   m_BaseOffset: 0
   m_WalkableMask: 4294967295
-  m_ObstacleAvoidanceType: 4
+  m_ObstacleAvoidanceType: 0
 --- !u!114 &919132149545680527
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -794,6 +762,25 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 5cc1798b39151d04aabb10b592d3c469, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+--- !u!95 &7737104438608917870
+Animator:
+  serializedVersion: 3
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3640209499596699500}
+  m_Enabled: 1
+  m_Avatar: {fileID: 0}
+  m_Controller: {fileID: 9100000, guid: dc5f84257ea32854f92692efafeffb6d, type: 2}
+  m_CullingMode: 0
+  m_UpdateMode: 0
+  m_ApplyRootMotion: 0
+  m_LinearVelocityBlending: 0
+  m_WarningMessage: 
+  m_HasTransformHierarchy: 1
+  m_AllowConstantClipSamplingOptimization: 1
+  m_KeepAnimatorControllerStateOnDisable: 0
 --- !u!1 &3692825253587210318
 GameObject:
   m_ObjectHideFlags: 0

+ 272 - 235
Assets/BowArrow/Scenes/GameChallengeScene/Yeji.cs

@@ -6,7 +6,7 @@ using UnityEngine.AI;
 public class Yeji : TargetAnimal
 {
     //动画播放器
-    AnimationPlayer ap;
+    Animator animator;
     //寻路代理
     NavMeshAgent agent;
     //血量
@@ -18,13 +18,16 @@ public class Yeji : TargetAnimal
         currentHeight = value;
         float agentBaseOffset = value - flyPlaneHeight;
         this.agent.baseOffset = agentBaseOffset / 1.2f;//因为agent的baseoffset会受节点的scale影响
+        state.flying = currentHeight > 0;
     }
 
     void Awake()
     {
-        ap = GetComponent<AnimationPlayer>();
+        state.animal = this;
+        animator = GetComponent<Animator>();
         agent = GetComponent<NavMeshAgent>();
         this.agent.avoidancePriority = avoidancePriority;
+        RandomWillFlyTime();
     }
     static int _avoidancePriority = 0;
     static int avoidancePriority {
@@ -38,10 +41,8 @@ public class Yeji : TargetAnimal
         }
     }
 
-    void Start()
-    {
-        //初始化自动策略
-        InitAutoStrategy();
+    void OnDestroy() {
+        ReleaseLandLock();
     }
 
     void Update()
@@ -52,276 +53,312 @@ public class Yeji : TargetAnimal
         } else {
             OnMovingToDestination();
         }
-        UpdateAction();
-        UpdateActionTime();
         UpdateAutoStrategy();
     }
 
-    public void Disappear() {
-        Destroy(this.gameObject);
-    }
-
-    public override void OnHit(Arrow arrow, Vector3 hitPoint, string partName)
-    {
-        arrow.Head().position = hitPoint + arrow.transform.forward * 0.1f;
-        arrow.Hit();
-        if (partName == "Wing") {
-            hp -= 1;
-            this.agent.speed /= 2f;
-        }
-        else if (partName == "Body") hp -= 2;
-        else if (partName == "Head") hp -= 3;
-        if (hp <= 0) {
-            Die(arrow);
-        } else {
-            Hurt();
+    #region 被击触发
+        public override void OnHit(Arrow arrow, Vector3 hitPoint, string partName)
+        {
+            arrow.Head().position = hitPoint + arrow.transform.forward * 0.1f;
+            arrow.Hit();
+            if (partName == "Wing") {
+                hp -= 1;
+                this.agent.speed /= 2f;
+            }
+            else if (partName == "Body") hp -= 2;
+            else if (partName == "Head") hp -= 3;
+            if (hp <= 0) {
+                Die(arrow);
+            } else {
+                Hurt();
+            }
         }
-    }
 
-    void Die(Arrow arrow) {
-        if (dead) return;
-        arrow.onDoNextShoot += delegate() {
-            Disappear();
-        };
-        dead = true;
-        this.agent.enabled = false;
-        PuaseAutoStrategy();
-        onDie?.Invoke(this);
-        AudioMgr.ins.PlayAnimalEffect("bird_die", AudioMgr.GetAudioSource(this.gameObject));
-        AudioMgr.ins.PlayCheer(true);
-        if (currentHeight < 1.5f) {
-            arrow.arrowCameraComp.arrowCameraTemplate.SendMsg(0, null);
+        void Die(Arrow arrow) {
+            if (state.dead) return;
+            arrow.onDoNextShoot += delegate() {
+                Destroy(this.gameObject);
+            };
+            this.animator.speed = 1;
+            state.dead = true;
+            this.agent.enabled = false;
+            onDie?.Invoke(this);
+            AudioMgr.ins.PlayAnimalEffect("bird_die", AudioMgr.GetAudioSource(this.gameObject));
+            AudioMgr.ins.PlayCheer(true);
+            if (currentHeight < 1.5f) {
+                arrow.arrowCameraComp.arrowCameraTemplate.SendMsg(0, null);
+            }
         }
-    }
 
-    void Hurt() {
-        CancelStand();
-        AudioMgr.ins.PlayAnimalEffect("bird_injured", AudioMgr.GetAudioSource(this.gameObject));
-    }
-
-    //站立状态
-    bool standing = false;
-    //是否已经死亡
-    [System.NonSerialized] public bool dead = false;
-    //是否处于移动状态
-    bool _moving = false;
-    bool moving {
-        get {
-            return _moving;
+        void Hurt() {
+            CancelStand();
+            AudioMgr.ins.PlayAnimalEffect("bird_injured", AudioMgr.GetAudioSource(this.gameObject));
         }
-        set {
-            if (_moving != value) {
+    #endregion
+
+    #region 寻路导航
+        bool _moving;
+        bool moving {
+            get { return _moving; }
+            set {
                 movingTime = 0;
-                stayingTime = 0;
+                _moving = value;
             }
-            _moving = value;
+        } 
+        float movingTime;
+        //启动寻路
+        void SetDestination(Vector3 pos) {
+            moving = true;
+            this.agent.destination = pos;
         }
-    }
-    //实时记录“单次移动的持续时间”
-    float movingTime = 0;
-    //实时停留时间
-    float stayingTime = 0;
-    //启动寻路
-    void SetDestination(Vector3 pos) {
-        moving = true;
-        this.agent.destination = pos;
-    }
-    //寻路过程
-    void OnMovingToDestination() {
-        if (!moving) return;
-    }
-    //寻路结束
-    void OnReachDestination() {
-        if (!moving) return;
-        moving = false;
-    }
-    //是否已经接近目的地(寻路完成判断)
-    bool HasCloseToDestination() {
-        if (!moving) return true;
-        if (movingTime > 0.1) {
-            if (this.agent.velocity.magnitude < 0.05f) {
-                return true;
-            }
+        //寻路过程
+        void OnMovingToDestination() {
+            if (!moving) return;
+            movingTime += Time.deltaTime;
         }
-        return false;
-    }
-    //更新动作
-    void UpdateAction() {
-        if (dead) {
-            if (!isAniDie()) playAniDie();
-        } else if (standing) {
-            if (!isAniStand()) playAniStand();
-        } else {
-            if (!isAniFly()) playAniFly();
+        //寻路结束
+        void OnReachDestination() {
+            if (!moving) return;
+            moving = false;
         }
-    }
-    //记录动作时间
-    void UpdateActionTime() {
-        if (moving) {
-            movingTime += Time.deltaTime;
-        } else {
-            stayingTime += Time.deltaTime;
+        //是否已经接近目的地(寻路完成判断)
+        bool HasCloseToDestination() {
+            if (!moving) return true;
+            return movingTime > 0.1 && this.agent.velocity.magnitude < 0.05f;
         }
-    }
-
-    bool autoStrategy = true;
-    //自动策略的更新逻辑
-    void UpdateAutoStrategy() {
-        if (!autoStrategy) return;
-        RandomMove();
-    }
-    void InitAutoStrategy() {
-        autoStrategy = true;
-    }
-    void PuaseAutoStrategy() {
-        autoStrategy = false;
-    }
-
-    //逃跑远离猎人
-    void RunAwayFromHunter() 
-    {
-        Vector3 backVec = GetPointerHunterToMe();
-        SetDestination(transform.position + backVec.normalized * 5);
-    }
-    
-    float toFlyHeight = 1.5f;
-    float canStandTime = 3f;
-    bool toUp = false;
-    bool toLand = false;
-    //能够在前几棵树徘徊
-    [System.NonSerialized] public int canFlyTreeCount = 4;
-    //将会绕树转
-    bool willMoveRoundTree = false;
-    Queue<Vector3> roundTreePostions = new Queue<Vector3>();
-    //随机移动
-    void RandomMove() {
-        if (dead) return;
+        //停止寻路
+        void StopNavigation() {
+            if (!moving) return;
+            this.agent.destination = this.agent.nextPosition;
+            this.agent.velocity = Vector3.zero;
+            this.transform.position = this.agent.destination;
+            OnReachDestination();
+        }
+    #endregion
 
-        if (moving) {
-            if (toUp) {
-                float nextFlyHeight = currentHeight + Time.deltaTime * 1f;
-                if (nextFlyHeight > toFlyHeight) {
+    #region 自动逻辑
+        //自动策略的更新逻辑
+        void UpdateAutoStrategy() {
+            if (state.dead) return;
+            UpdateFlyUpDown();
+            UpdateBehavior();
+        }
+        
+        float toFlyHeight = 2f;
+        float canStandTime = 3f;
+        //能够在前几棵树徘徊
+        [System.NonSerialized] public int canFlyTreeCount = 4;
+        //将会绕树转
+        bool willMoveRoundTree = false;
+        Queue<Vector3> roundTreePostions = new Queue<Vector3>();
+        //随机移动
+        void UpdateFlyUpDown() {
+            if (state.up && state.landing) { //起飞阶段
+                AnimatorStateInfo animatorStateInfo = animator.GetCurrentAnimatorStateInfo(0);
+                bool isTakeOff = animatorStateInfo.IsName("FlyFromGround");
+                if (isTakeOff) {
+                    if (animatorStateInfo.normalizedTime >= 1.0) {
+                        state.landing = false;
+                        state.flying = true;
+                        Invoke("ReleaseLandLock", Random.value * 3f + 1.0f);
+                    }
+                }
+                return;
+            }
+            if (state.up && state.flying) { //上升阶段
+                float surplusHeight = toFlyHeight - currentHeight;
+                float smoothValue = surplusHeight / toFlyHeight;
+                float nextFlyHeight = currentHeight + Time.deltaTime * (1f + 2.5f * smoothValue);
+                this.animator.speed = 1f + 2f * smoothValue;
+                if (nextFlyHeight >= toFlyHeight) { //上升完成
                     nextFlyHeight = toFlyHeight;
-                    toUp = false;
+                    this.animator.speed = 1;
+                    state.up = false;
                 }
                 SetFlyHeight(nextFlyHeight);
                 return;
             }
-            if (toLand) {
-                float nextH = currentHeight - Time.deltaTime * 1.5f;
-                if (nextH < 0) {
+            if (state.down && state.flying) { //下降阶段
+                float nextH = currentHeight - Time.deltaTime * 2f;
+                if (nextH <= 0) { //下降完成
                     nextH = 0;
-                    toLand = false;
-                    //进入站立状态
-                    standing = true;
-                    canStandTime = 2f + Random.value * 3f;
-                    Stay();
+                    state.landing = true;
+                    state.flying = false;
+                    StopNavigation();
                 }
                 SetFlyHeight(nextH);
                 return;
             }
-            return;
-        }
-        
-        if (standing) {
-            canStandTime -= Time.deltaTime;
-            if (canStandTime <= 0) {
-                CancelStand();
+            if (state.down && state.landing) { //着落阶段
+                AnimatorStateInfo animatorStateInfo = animator.GetCurrentAnimatorStateInfo(0);
+                bool isLand = animatorStateInfo.IsName("LandOnGround");
+                if (isLand) {
+                    if (animatorStateInfo.normalizedTime >= 1.0) {
+                        state.down = false;
+                        //进入站立状态
+                        state.standing = true;
+                        canStandTime = 2f + Random.value * 3f;
+                        animator.CrossFade("IdleOnGround2", 0.2f);
+                    }
+                }
+                return;
             }
-            return;
         }
+        float willFlyTime;
+        float flyingTime;
+        void UpdateBehavior() {
+            if (state.standing) {
+                canStandTime -= Time.deltaTime;
+                if (canStandTime <= 0) {
+                    CancelStand();
+                }
+                return;
+            }
 
-        if (willMoveRoundTree && roundTreePostions.Count > 0) {
-            Vector3 pos = roundTreePostions.Dequeue();
-            SetDestination(pos);
-            return;
-        } else {
-            willMoveRoundTree = false;
-        }
+            if (state.landing) return;
+
+            if (state.flying && !state.down && !state.up) {
+                flyingTime += Time.deltaTime;
+                if (flyingTime >= willFlyTime && DoLandLock()) {
+                    flyingTime = 0;
+                    state.down = true;
+                }
+            }
+            
+            if (moving) return;
+
+            if (willMoveRoundTree && roundTreePostions.Count > 0) {
+                Vector3 pos = roundTreePostions.Dequeue();
+                SetDestination(pos);
+                return;
+            } else {
+                willMoveRoundTree = false;
+            }
 
-        bool isOnLand = currentHeight < 0.001f;
-        if (!isOnLand) {
-            if (Random.value < 0.5) {
-                toLand = true;
+            //规划下一次行动路线
+            Vector3 myPos = this.transform.position; 
+            TreeAreaRecorder.AreaInfo[] areaInfos = treeAreaRecorder.copyAreaInfos(canFlyTreeCount); 
+            for (int i = 0; i < canFlyTreeCount; i++) {
+                areaInfos[i].teamCompareValue = areaInfos[i].distanceInHorizontal(myPos);
+            }
+            System.Array.Sort(areaInfos, new ComparerAreaInfosByDistance());
+            //如果离这棵树比较近,有几率使其绕着树转
+            TreeAreaRecorder.AreaInfo firstAreaInfo = areaInfos[0];
+            bool isNearTree4th = areaInfos.Length == 4 && firstAreaInfo == treeAreaRecorder.getValidAreaInfo(3);
+            if (!isNearTree4th && firstAreaInfo.teamCompareValue < firstAreaInfo.radius + 1.5f && Random.value < 0.5) {
+                willMoveRoundTree = true;
+                Vector3 treePos = areaInfos[0].transform.position; 
+                treePos.y = myPos.y;
+                Vector3 pointer = myPos - treePos;
+                roundTreePostions.Clear();
+                int direction = Random.value >= 0.5 ? 1 : -1;
+                for (int i = 1; i <= 6; i++) {
+                    roundTreePostions.Enqueue(treePos + Quaternion.AngleAxis(i * 60 * direction, Vector3.up) * pointer);
+                }
                 return;
             }
+            TreeAreaRecorder.AreaInfo areaInfo = areaInfos[Random.Range(1, canFlyTreeCount)];
+            Vector3 newPos = YejiHuntGameMode.CalculateNewPosByTreePos(animalsBaseT, flyPlaneHeight, areaInfo);
+            SetDestination(newPos);
         }
 
-        //规划下一次行动路线
-        Vector3 myPos = this.transform.position; 
-        TreeAreaRecorder.AreaInfo[] areaInfos = treeAreaRecorder.copyAreaInfos(canFlyTreeCount); 
-        for (int i = 0; i < canFlyTreeCount; i++) {
-            areaInfos[i].teamCompareValue = areaInfos[i].distanceInHorizontal(myPos);
+        class ComparerAreaInfosByDistance : IComparer {
+            public int Compare(object x, object y) {
+                TreeAreaRecorder.AreaInfo a = (TreeAreaRecorder.AreaInfo)x;
+                TreeAreaRecorder.AreaInfo b = (TreeAreaRecorder.AreaInfo)y;
+                if (a.teamCompareValue - b.teamCompareValue > 0) return 1;
+                if (a.teamCompareValue - b.teamCompareValue < 0) return -1;
+                else return 0;
+            }
         }
-        System.Array.Sort(areaInfos, new ComparerAreaInfosByDistance());
-        //如果离这棵树比较近,有几率使其绕着树转
-        TreeAreaRecorder.AreaInfo firstAreaInfo = areaInfos[0];
-        bool isNearTree4th = areaInfos.Length == 4 && firstAreaInfo == treeAreaRecorder.getValidAreaInfo(3);
-        if (!isNearTree4th && firstAreaInfo.teamCompareValue < firstAreaInfo.radius + 1.5f && Random.value < 0.5) {
-            willMoveRoundTree = true;
-            Vector3 treePos = areaInfos[0].transform.position; 
-            treePos.y = myPos.y;
-            Vector3 pointer = myPos - treePos;
-            roundTreePostions.Clear();
-            int direction = Random.value >= 0.5 ? 1 : -1;
-            for (int i = 1; i <= 6; i++) {
-                roundTreePostions.Enqueue(treePos + Quaternion.AngleAxis(i * 60 * direction, Vector3.up) * pointer);
+        void CancelStand() {
+            if (!state.standing) return;
+            state.standing = false;
+            state.up = true;
+            toFlyHeight = RandomOnePreHeight();
+            animator.CrossFade("FlyFromGround", 0.1f);
+            RandomWillFlyTime();
+        }
+        void RandomWillFlyTime() {
+            willFlyTime = 4 + Random.value * 3f;
+        }
+        static float[] preFlyHeights;
+        static int[] preFlyHeightCools;
+        public static void InitPreHeights() {
+            preFlyHeights = new float[]{2, 2.5f, 3, 3.5f, 4f};
+            preFlyHeightCools = new int[]{0, 0, 0, 0, 0};
+        }
+        public static float RandomOnePreHeight() {
+            List<int> indexes = new List<int>();
+            for (int i = 0; i < preFlyHeightCools.Length; i++) {
+                if (preFlyHeightCools[i] > 0) preFlyHeightCools[i] = preFlyHeightCools[i] - 1;
+                if (preFlyHeightCools[i] == 0) {
+                    indexes.Add(i);
+                }
             }
-            RandomMove();
-            return;
+            int index = indexes[Random.Range(0, indexes.Count)];
+            preFlyHeightCools[index] = 3;
+            return preFlyHeights[index];
         }
-        TreeAreaRecorder.AreaInfo areaInfo = areaInfos[Random.Range(1, canFlyTreeCount)];
-        Vector3 newPos = YejiHuntGameMode.CalculateNewPosByTreePos(animalsBaseT, flyPlaneHeight, areaInfo);
-        SetDestination(newPos);
-    }
-
-    class ComparerAreaInfosByDistance : IComparer {
-        public int Compare(object x, object y) {
-            TreeAreaRecorder.AreaInfo a = (TreeAreaRecorder.AreaInfo)x;
-            TreeAreaRecorder.AreaInfo b = (TreeAreaRecorder.AreaInfo)y;
-            if (a.teamCompareValue - b.teamCompareValue > 0) return 1;
-            if (a.teamCompareValue - b.teamCompareValue < 0) return -1;
-            else return 0;
+        public static bool landLocked = false; //着陆锁,禁止地上同时存在两只鸟,避免穿模
+        private bool myLandLocked = false;
+        public bool DoLandLock() {
+            if (landLocked) return false;
+            return myLandLocked = landLocked = true;
         }
-    }
-
-    //停留
-    void Stay() {
-        if (moving) {
-            this.agent.destination = this.agent.nextPosition;
-            OnReachDestination();
+        public void ReleaseLandLock() {
+            if (!myLandLocked) return;
+            myLandLocked = landLocked = false;
         }
-    }
+    #endregion
 
-    //取消站在地上
-    void CancelStand() {
-        if (standing) {
-            standing = false;
-            toUp = true;
-            toFlyHeight = 1.5f + Random.value * 2.5f;
+    //状态
+    [System.Serializable]
+    public class State {
+        public bool standing = false;
+        [SerializeField] private bool _dead;
+        public bool dead {
+            get { return _dead; }
+            set {
+                _dead = value;
+                animal.animator.SetBool("dead", value);
+            }
         }
+        [SerializeField] private bool _down;
+        public bool down {
+            get { return _down; }
+            set {
+                _down = value;
+                animal.animator.SetBool("down", value);
+            }
+        }
+        [SerializeField] private bool _landing;
+        public bool landing {
+            get { return _landing; }
+            set {
+                _landing = value;
+                animal.animator.SetBool("landing", value);
+            }
+        }
+        [SerializeField] private bool _up;
+        public bool up {
+            get { return _up; }
+            set {
+                _up = value;
+                animal.animator.SetBool("up", value);
+            }
+        }
+        [SerializeField] private bool _flying;
+        public bool flying {
+            get { return _flying; }
+            set {
+                _flying = value;
+                animal.animator.SetBool("flying", value);
+            }
+        }
+        public Yeji animal;
     }
-
-    //当前动画索引
-    int curAnimIndex = -1;
-    void playAniDie() {
-        ap.play(curAnimIndex = 1, WrapMode.Once);
-    }
-    bool isAniDie() {
-        return curAnimIndex == 1;
-    }
-    void playAniFly() {
-        ap.play(curAnimIndex = 0, WrapMode.Loop);
-    }
-    bool isAniFly() {
-        return curAnimIndex == 0;
-    }
-    void playAniStand() {
-        ap.play(curAnimIndex = 2, WrapMode.Loop);
-    }
-    bool isAniStand() {
-        return curAnimIndex == 2;
-    }
+    [SerializeField] public State state = new State();
 
     //委托
     public System.Action<Yeji> onDie;

+ 11 - 5
Assets/BowArrow/Scenes/GameChallengeScene/YejiHuntGameMode.cs

@@ -19,14 +19,20 @@ public class YejiHuntGameMode : ChallengeGameMode
 
     public override void Start() {
         UnbanBowReady();
+        Yeji.InitPreHeights();
+        Yeji.landLocked = false;
         if (nextLevel != null) {
             SetLevel(int.Parse(nextLevel));
             AddHuntGameView();
         } else {
             AddSelectLevelView();
+            // SetLevel(5);
+            // AddHuntGameView();
+
+            // GameObject.FindObjectOfType<BowCamera>().enabled = false;
+            // GameObject.Find("ArmBow").SetActive(false);
+            // GameObject.Find("CrossHair").SetActive(false);
         }
-        // SetLevel(1);
-        // gameMgr.transform.Find("HunterGameView").gameObject.SetActive(true);
     }
 
     //表示能创建的最大动物数量
@@ -58,7 +64,7 @@ public class YejiHuntGameMode : ChallengeGameMode
         //计算初始生成位置,后面的兔子生成越来越远,在标准方向的±30°内生成
         #region 
             if (createAnimalIndex < 2) {
-                createNearTreeIndex = Random.Range(0, 2);
+                createNearTreeIndex = createAnimalIndex;
                 canFlyTreeCount = 2;
             } else if (createAnimalIndex < 4) {
                 createNearTreeIndex = Random.Range(1, 3);
@@ -67,7 +73,7 @@ public class YejiHuntGameMode : ChallengeGameMode
                 createNearTreeIndex = Random.Range(2, 4);
                 canFlyTreeCount = 4;
             } 
-            baseFlyHeight = baseFlyHeightMin + 0.5f *  createAnimalIndex;
+            baseFlyHeight = Yeji.RandomOnePreHeight();
             TreeAreaRecorder.AreaInfo areaInfo = treeAreaRecorder.getValidAreaInfo(createNearTreeIndex);
             Vector3 newPos = CalculateNewPosByTreePos(animalsBaseT, flyPlaneHeight, areaInfo);
         #endregion
@@ -76,8 +82,8 @@ public class YejiHuntGameMode : ChallengeGameMode
         animalObject.SetActive(true);
 
         Yeji yeji = animalObject.GetComponent<Yeji>();
-        yeji.canFlyTreeCount = canFlyTreeCount;
         yeji.treeAreaRecorder = treeAreaRecorder;
+        yeji.canFlyTreeCount = canFlyTreeCount;
         yeji.flyPlaneHeight = flyPlaneHeight;
         yeji.SetFlyHeight(baseFlyHeight);
         yeji.RotateByWorldY(Random.value * 360);

+ 1 - 1
Assets/BowArrow/Scripts/Manager/GameMgr.cs

@@ -8,7 +8,7 @@ using UnityEngine.SceneManagement;
 public class GameMgr : MonoBehaviour
 {
     public static bool debugInEditor = false;
-    public static int gameType = 5;
+    public static int gameType = 4;
     public GameMode gameMode;
     [System.NonSerialized] public bool gameOver = false;
     public static GameMgr ins;