Explorar el Código

Merge remote-tracking branch 'origin/main'

# Conflicts:
#	SFGgouhuo/Assets/_TerrainAutoUpgrade/layer_3d3aba195e4d26ee.terrainlayer.meta
ZXW hace 1 año
padre
commit
adc327f710

+ 5 - 1
SFGgouhuo/Assets/Bundles/Model/player.prefab

@@ -3644,7 +3644,7 @@ Animator:
   m_GameObject: {fileID: 8506920667800481216}
   m_Enabled: 1
   m_Avatar: {fileID: 9000000, guid: 9c27f20f42c1ef34a8d6ca1a8b3c981f, type: 3}
-  m_Controller: {fileID: 0}
+  m_Controller: {fileID: 9100000, guid: 70c8f0de6544f484491c1a08cd215163, type: 2}
   m_CullingMode: 1
   m_UpdateMode: 0
   m_ApplyRootMotion: 1
@@ -3805,6 +3805,10 @@ MonoBehaviour:
         m_CallState: 2
     m_ActionId: 857e8ab0-8f79-4c77-9c21-974520656eea
     m_ActionName: Player/Touch1[/Simulated Touchscreen/touch1/delta]
+  - m_PersistentCalls:
+      m_Calls: []
+    m_ActionId: bf0b2066-2bff-42a3-9b65-402f6d8066a9
+    m_ActionName: Player/Camera[/Mouse/delta]
   m_NeverAutoSwitchControlSchemes: 0
   m_DefaultControlScheme: 
   m_DefaultActionMap: Player

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 706 - 58
SFGgouhuo/Assets/Bundles/Model/player1.prefab


+ 24 - 0
SFGgouhuo/Assets/Bundles/Scenes/MainScene.unity

@@ -1528,10 +1528,18 @@ PrefabInstance:
       propertyPath: m_Name
       value: zheng
       objectReference: {fileID: 0}
+    - target: {fileID: 970238696011076066, guid: 77de5b4dd34b3ea4e93f57b0a28c0ba6, type: 3}
+      propertyPath: m_Layer
+      value: 18
+      objectReference: {fileID: 0}
     - target: {fileID: 970238696011076066, guid: 77de5b4dd34b3ea4e93f57b0a28c0ba6, type: 3}
       propertyPath: m_StaticEditorFlags
       value: 122
       objectReference: {fileID: 0}
+    - target: {fileID: 6253111686536253360, guid: 77de5b4dd34b3ea4e93f57b0a28c0ba6, type: 3}
+      propertyPath: m_Layer
+      value: 18
+      objectReference: {fileID: 0}
     - target: {fileID: 6253111686536253360, guid: 77de5b4dd34b3ea4e93f57b0a28c0ba6, type: 3}
       propertyPath: m_StaticEditorFlags
       value: 122
@@ -6949,10 +6957,18 @@ PrefabInstance:
       propertyPath: m_Name
       value: fu
       objectReference: {fileID: 0}
+    - target: {fileID: 6809007366758586997, guid: e00619deccb8bf6409638465d4477da5, type: 3}
+      propertyPath: m_Layer
+      value: 18
+      objectReference: {fileID: 0}
     - target: {fileID: 6809007366758586997, guid: e00619deccb8bf6409638465d4477da5, type: 3}
       propertyPath: m_StaticEditorFlags
       value: 122
       objectReference: {fileID: 0}
+    - target: {fileID: 8415292560822078594, guid: e00619deccb8bf6409638465d4477da5, type: 3}
+      propertyPath: m_Layer
+      value: 18
+      objectReference: {fileID: 0}
     - target: {fileID: 8415292560822078594, guid: e00619deccb8bf6409638465d4477da5, type: 3}
       propertyPath: m_StaticEditorFlags
       value: 122
@@ -92662,6 +92678,10 @@ PrefabInstance:
       propertyPath: m_Name
       value: "\u6362\u88C5\u5E95"
       objectReference: {fileID: 0}
+    - target: {fileID: 1840560345367622488, guid: aeb693c6cb8606843bfe3bf7c85cc0cc, type: 3}
+      propertyPath: m_Layer
+      value: 18
+      objectReference: {fileID: 0}
     - target: {fileID: 1840560345367622488, guid: aeb693c6cb8606843bfe3bf7c85cc0cc, type: 3}
       propertyPath: m_StaticEditorFlags
       value: 122
@@ -92674,6 +92694,10 @@ PrefabInstance:
       propertyPath: m_StaticEditorFlags
       value: 122
       objectReference: {fileID: 0}
+    - target: {fileID: 6944935360640773986, guid: aeb693c6cb8606843bfe3bf7c85cc0cc, type: 3}
+      propertyPath: m_Layer
+      value: 18
+      objectReference: {fileID: 0}
     - target: {fileID: 6944935360640773986, guid: aeb693c6cb8606843bfe3bf7c85cc0cc, type: 3}
       propertyPath: m_StaticEditorFlags
       value: 122

+ 5 - 3
SFGgouhuo/Assets/GameResources/Player/AnimatorController.cs

@@ -73,21 +73,23 @@ public class AnimatorController : MonoBehaviour
             _fallTimeoutTimer = FallTimeout;
 
             // 动画设为非空中状态
-            if (_hasAnimator)
+            if (_hasAnimator )
             {
                 _animator.SetBool(_animIDJump, false);
                 _animator.SetBool(_animIDFreeFall, false);
             }
 
             // 满足条件开始跳跃
+            Debug.Log(jump + "*********" + _hasAnimator);
             if (jump)
             {
                 if (_hasAnimator)
                 {
                     _animator.SetBool(_animIDJump, true);
                 }
-                jump = false;
+                
             }
+            jump = false;
         }
         else
         {
@@ -101,7 +103,7 @@ public class AnimatorController : MonoBehaviour
                 // 滞空结束,开始播放下落动画
                 if (_hasAnimator)
                 {
-                    _animator.SetBool(_animIDFreeFall, true);
+                   _animator.SetBool(_animIDFreeFall, true);
                 }
             }
             jump = false;

+ 21 - 21
SFGgouhuo/Assets/GameResources/Player/PlayerArmature.prefab

@@ -152,7 +152,7 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8762427900362077118}
-  m_LocalRotation: {x: 0.58136255, y: 0.054367233, z: 0.010174443, w: 0.8117625}
+  m_LocalRotation: {x: 0.58135444, y: 0.054149568, z: 0.010327972, w: 0.81178087}
   m_LocalPosition: {x: 0.000004911422, y: 0.3789641, z: 0.0000036811825}
   m_LocalScale: {x: 0.9999998, y: 1.0000001, z: 0.99999994}
   m_Children:
@@ -463,7 +463,7 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8762427900711909222}
-  m_LocalRotation: {x: -0.003074378, y: 0.10959924, z: -0.7832776, w: 0.6119271}
+  m_LocalRotation: {x: -0.0030744139, y: 0.10959921, z: -0.7832777, w: 0.611927}
   m_LocalPosition: {x: 0.048186224, y: 0.14500271, z: 0.00531524}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children:
@@ -494,8 +494,8 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8762427900721381661}
-  m_LocalRotation: {x: -0.0026182015, y: 0.06747822, z: 0.9972276, w: 0.03125537}
-  m_LocalPosition: {x: -0.06875997, y: -0.042313203, z: 0.022964278}
+  m_LocalRotation: {x: -0.0028852264, y: 0.06747765, z: 0.99722743, w: 0.031239577}
+  m_LocalPosition: {x: -0.068759926, y: -0.042313203, z: 0.022964446}
   m_LocalScale: {x: 0.99999994, y: 1, z: 1.0000001}
   m_Children:
   - {fileID: 8762427901331142558}
@@ -526,8 +526,8 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8762427900724448093}
-  m_LocalRotation: {x: 0.0026182039, y: 0.067478225, z: 0.99722767, w: -0.031255107}
-  m_LocalPosition: {x: 0.06875996, y: -0.042313147, z: 0.022964269}
+  m_LocalRotation: {x: 0.0026147433, y: 0.06745079, z: 0.9972297, w: -0.031250786}
+  m_LocalPosition: {x: 0.06875991, y: -0.042313226, z: 0.022964438}
   m_LocalScale: {x: 1, y: 1.0000001, z: 1.0000001}
   m_Children:
   - {fileID: 8762427902295418897}
@@ -1014,7 +1014,7 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8762427900818529073}
-  m_LocalRotation: {x: 0.58136255, y: -0.054367285, z: -0.010174431, w: 0.8117625}
+  m_LocalRotation: {x: 0.58134633, y: -0.05437298, z: -0.0101735545, w: 0.8117737}
   m_LocalPosition: {x: -0.000004854202, y: 0.37896448, z: 0.0000036954875}
   m_LocalScale: {x: 0.99999976, y: 1, z: 0.9999999}
   m_Children:
@@ -1939,7 +1939,7 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8762427901331142559}
-  m_LocalRotation: {x: -0.011817737, y: -0.0011575002, z: 0.0019700502, w: 0.9999276}
+  m_LocalRotation: {x: -0.011803187, y: -0.001157875, z: 0.0019676709, w: 0.9999278}
   m_LocalPosition: {x: -0.000014133454, y: 0.28059646, z: -0.0000091815}
   m_LocalScale: {x: 0.99999994, y: 0.9999998, z: 1.0000001}
   m_Children:
@@ -3062,8 +3062,8 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8762427901536452329}
-  m_LocalRotation: {x: -0.08538248, y: -2.6681975e-16, z: -0.00000014881468, w: 0.99634826}
-  m_LocalPosition: {x: 0.000000019475602, y: 0.06557348, z: 0.000019664762}
+  m_LocalRotation: {x: -0.08538238, y: 0.000000026708667, z: -0.0000001227197, w: 0.99634826}
+  m_LocalPosition: {x: 0.000000018628985, y: 0.06557372, z: 0.000018988736}
   m_LocalScale: {x: 1, y: 1.0000001, z: 1.0000001}
   m_Children:
   - {fileID: 8762427900504199576}
@@ -3247,7 +3247,7 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8762427901671856371}
-  m_LocalRotation: {x: 0.0053883516, y: -0.007985984, z: 0.005922015, w: 0.9999361}
+  m_LocalRotation: {x: 0.005394143, y: -0.007986244, z: 0.0059275497, w: 0.999936}
   m_LocalPosition: {x: -0.000016029475, y: 0.18602979, z: -0.000017094611}
   m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000002}
   m_Children:
@@ -3705,7 +3705,7 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8762427901885600985}
-  m_LocalRotation: {x: 0.0053881966, y: 0.007986029, z: -0.00592172, w: 0.9999361}
+  m_LocalRotation: {x: 0.0053948807, y: 0.007985989, z: -0.0059289136, w: 0.99993604}
   m_LocalPosition: {x: 0.000016171934, y: 0.18602999, z: -0.000017125609}
   m_LocalScale: {x: 1.0000001, y: 0.99999994, z: 1.0000001}
   m_Children:
@@ -3976,8 +3976,8 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8762427901997230135}
-  m_LocalRotation: {x: 0.06399237, y: 0.012902042, z: 0.11824653, w: 0.99083614}
-  m_LocalPosition: {x: 0.0000001883507, y: 0.085702226, z: -0.00000009536744}
+  m_LocalRotation: {x: 0.06404625, y: 0.012449478, z: 0.11821252, w: 0.9908425}
+  m_LocalPosition: {x: 0.00000020302832, y: 0.08570245, z: 0.0000026435591}
   m_LocalScale: {x: 0.99999994, y: 0.9999998, z: 1}
   m_Children:
   - {fileID: 8762427901671856370}
@@ -4069,8 +4069,8 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8762427902022659837}
-  m_LocalRotation: {x: 0.06399226, y: -0.012902021, z: -0.11824684, w: 0.99083614}
-  m_LocalPosition: {x: -0.00000022172925, y: 0.08570228, z: -0.00000007987021}
+  m_LocalRotation: {x: 0.06405747, y: -0.012355084, z: -0.1182057, w: 0.9908438}
+  m_LocalPosition: {x: -0.00000010430813, y: 0.08570242, z: 0.0000026347118}
   m_LocalScale: {x: 1.0000002, y: 1.0000001, z: 1.0000002}
   m_Children:
   - {fileID: 8762427901885600984}
@@ -4226,7 +4226,7 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8762427902163220829}
-  m_LocalRotation: {x: -0.003074381, y: -0.10959926, z: 0.7832778, w: 0.6119268}
+  m_LocalRotation: {x: -0.003074399, y: -0.10959914, z: 0.78327787, w: 0.6119268}
   m_LocalPosition: {x: -0.048186224, y: 0.14500263, z: 0.0053152055}
   m_LocalScale: {x: 1, y: 0.99999994, z: 0.99999994}
   m_Children:
@@ -4319,8 +4319,8 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8762427902218368406}
-  m_LocalRotation: {x: 0.6983415, y: -0, z: -0, w: 0.71576476}
-  m_LocalPosition: {x: -0, y: 0.000000015497962, z: 0.844464}
+  m_LocalRotation: {x: 0.69834155, y: -0.00000001325385, z: -0.000000022976499, w: 0.7157648}
+  m_LocalPosition: {x: 0, y: 0.0000000037252903, z: -0.025361503}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children:
   - {fileID: 8762427901970835926}
@@ -4412,7 +4412,7 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8762427902295418926}
-  m_LocalRotation: {x: -0.0118177375, y: 0.0011574995, z: -0.0019700492, w: 0.9999276}
+  m_LocalRotation: {x: -0.01177025, y: 0.0011577873, z: -0.0019622224, w: 0.9999282}
   m_LocalPosition: {x: 0.000014123917, y: 0.28059638, z: -0.000009194316}
   m_LocalScale: {x: 1, y: 0.9999998, z: 1.0000001}
   m_Children:
@@ -4445,7 +4445,7 @@ Transform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8762427902300486212}
-  m_LocalRotation: {x: 0.045168076, y: -5.6392743e-16, z: 0.00000014893564, w: 0.99897945}
+  m_LocalRotation: {x: 0.045167997, y: -4.707344e-14, z: 0.00000014893568, w: 0.99897945}
   m_LocalPosition: {x: 2.025893e-15, y: 0.058465876, z: 0.011619233}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children:

+ 6 - 2
SFGgouhuo/Assets/Scripts/MoveController.cs

@@ -7,12 +7,13 @@ public class MoveController : MonoBehaviour
 {
     public float jumpHeight = 2.0f;
     public float gravity = -9.8f;
-    private float speed = 3f;
+    private float speed = 6f;
     private float verticalVelocity = 0.0f;
     private bool isGrounded = false;
     private float groundCheckDistance = 0.01f;
-    private int groundLayer = 1 << 18;
+    private int groundLayer = ~(1 << 6);
     public PlayerInputComponent playerInput;
+    private AnimatorController controller;
     private Vector3 move;
     private Vector3 gravityMove;
     private Vector3 initPos;
@@ -34,6 +35,7 @@ public class MoveController : MonoBehaviour
     // Start is called before the first frame update
     void Start()
     {
+        controller = GetComponent<AnimatorController>();
         character = GetComponent<CharacterController>();
         playerInput=GetComponent<PlayerInputComponent>();
         angleX = Vector3.Angle(Vector3.right, camera.right);
@@ -54,6 +56,7 @@ public class MoveController : MonoBehaviour
             {
                 state = PlayerState.JumpUp;
                 Jump();
+                controller.jump = true;
             }
 
         }
@@ -152,6 +155,7 @@ public class MoveController : MonoBehaviour
         );
         Quaternion rot = Quaternion.Euler(0, angle, 0);
         //Vector3 move2 = camera.transform.TransformDirection(move);
+        controller.speed = move.magnitude * 300;
         character.Move(rot * move + gravityMove);
         camera.position= character.transform.position+new Vector3(0,1.148f,0);
     }

+ 1 - 1
SFGgouhuo/Assets/_TerrainAutoUpgrade/layer_3d3aba195e4d26ee.terrainlayer.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 3a160a6488930f04e8ff4d12d8215f5a
+guid: 7246dd4b83f2c5544bce17fd1ec54f7a
 NativeFormatImporter:
   externalObjects: {}
   mainObjectFileID: 8574412962073106934

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio