From 2053038f819bbaf41af72ffc37fa602446b9d7cb Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Mon, 30 Oct 2023 00:20:27 +0800 Subject: =?UTF-8?q?*=E5=AE=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "Doc/ROUNDS\345\210\206\346\236\220.xlsx" | Bin 11580685 -> 12223083 bytes ROUNDS/.vs/ROUNDS/DesignTimeBuild/.dtbcache.v2 | Bin 116663 -> 116754 bytes ROUNDS/.vs/ROUNDS/v17/.suo | Bin 214528 -> 217600 bytes ROUNDS/ROUNDS.csproj | 7 ++++++- ROUNDS/_Player/CollisionChecker.cs | 6 +++++- ROUNDS/_Player/LegRaycasters.cs | 8 ++++++-- ROUNDS/_Player/PlayerCollision.cs | 10 +++++++--- ROUNDS/_Player/PlayerMovement.cs | 5 ++++- .../bin/Debug/netstandard2.1/Assembly-CSharp.dll | Bin 907776 -> 909824 bytes .../bin/Debug/netstandard2.1/Assembly-CSharp.pdb | Bin 486436 -> 487236 bytes .../obj/Debug/netstandard2.1/Assembly-CSharp.dll | Bin 907776 -> 909824 bytes .../obj/Debug/netstandard2.1/Assembly-CSharp.pdb | Bin 486436 -> 487236 bytes .../ROUNDS.csproj.CoreCompileInputs.cache | 2 +- 13 files changed, 29 insertions(+), 9 deletions(-) diff --git "a/Doc/ROUNDS\345\210\206\346\236\220.xlsx" "b/Doc/ROUNDS\345\210\206\346\236\220.xlsx" index bed2132..37066cd 100644 Binary files "a/Doc/ROUNDS\345\210\206\346\236\220.xlsx" and "b/Doc/ROUNDS\345\210\206\346\236\220.xlsx" differ diff --git a/ROUNDS/.vs/ROUNDS/DesignTimeBuild/.dtbcache.v2 b/ROUNDS/.vs/ROUNDS/DesignTimeBuild/.dtbcache.v2 index 9574726..01bc485 100644 Binary files a/ROUNDS/.vs/ROUNDS/DesignTimeBuild/.dtbcache.v2 and b/ROUNDS/.vs/ROUNDS/DesignTimeBuild/.dtbcache.v2 differ diff --git a/ROUNDS/.vs/ROUNDS/v17/.suo b/ROUNDS/.vs/ROUNDS/v17/.suo index 933d54b..f8d3e6a 100644 Binary files a/ROUNDS/.vs/ROUNDS/v17/.suo and b/ROUNDS/.vs/ROUNDS/v17/.suo differ diff --git a/ROUNDS/ROUNDS.csproj b/ROUNDS/ROUNDS.csproj index ce465f3..2577a43 100644 --- a/ROUNDS/ROUNDS.csproj +++ b/ROUNDS/ROUNDS.csproj @@ -8,7 +8,12 @@ 11.0 True - + + $(DefineConstants)TRACE; + + + $(DefineConstants)TRACE; + ..\..\Game\Rounds_Data\Managed\AmplifyColor.dll diff --git a/ROUNDS/_Player/CollisionChecker.cs b/ROUNDS/_Player/CollisionChecker.cs index f48520e..fac3d45 100644 --- a/ROUNDS/_Player/CollisionChecker.cs +++ b/ROUNDS/_Player/CollisionChecker.cs @@ -26,7 +26,11 @@ public class CollisionChecker : MonoBehaviour private void Collide(Collision2D collision) { - if (collisionAction != null) +#if IGNORE_COLLISIONCHECK + return ; +#endif + + if (collisionAction != null) { collisionAction(collision); } diff --git a/ROUNDS/_Player/LegRaycasters.cs b/ROUNDS/_Player/LegRaycasters.cs index db65cf1..2807f8d 100644 --- a/ROUNDS/_Player/LegRaycasters.cs +++ b/ROUNDS/_Player/LegRaycasters.cs @@ -67,9 +67,12 @@ public class LegRaycasters : MonoBehaviour { if (!(data.sinceJump < 0.2f) && !(Vector3.Angle(Vector3.up, hit.normal) > 70f)) { +#if !IGNORE_TOUCHGROUND // touch ground 很重要,影响着地后的gravity为0 data.TouchGround(hit.point, hit.normal, hit.rigidbody); +#endif +#if !IGNORE_HITGROUND // 施加向上的力 Vector3 vector = ((Vector3)hit.point - leg.transform.position) / base.transform.root.localScale.x; if (data.input.direction.x != 0f) @@ -79,6 +82,7 @@ public class LegRaycasters : MonoBehaviour } rig.AddForce(animationCurve.Evaluate(Mathf.Abs(vector.y)) * Vector3.up * rig.mass * force);//一个垂直向上的力 rig.AddForce(animationCurve.Evaluate(Mathf.Abs(vector.y)) * (0f - rig.velocity.y) * Vector2.up * rig.mass * drag);//一个垂直想让的阻力 - } - } +#endif + } + } } diff --git a/ROUNDS/_Player/PlayerCollision.cs b/ROUNDS/_Player/PlayerCollision.cs index c6f2750..36f0113 100644 --- a/ROUNDS/_Player/PlayerCollision.cs +++ b/ROUNDS/_Player/PlayerCollision.cs @@ -51,7 +51,8 @@ public class PlayerCollision : MonoBehaviour // PlayerVelocity强制设置一个向下的速度后,角色并没有陷到地面以下,是因为这里的碰撞检测。如果注释掉,角色就会陷入地面以下 private void FixedUpdate() - { + { +#if !IGNORE_CHECKWALL #region 检测墙,和地面无关(好像也有关) if (checkForGoThroughWall && ignoreWallFor <= 0) { @@ -78,7 +79,9 @@ public class PlayerCollision : MonoBehaviour } } #endregion +#endif +#if !IGNORE_CIRCLECAST #region 碰撞检测 ignoreWallFor--; lastPos = base.transform.position; @@ -130,9 +133,10 @@ public class PlayerCollision : MonoBehaviour DoBounce(array2[j]); } } - #endregion + #endregion +#endif - lastPos = base.transform.position; + lastPos = base.transform.position; } private void DoBounce(RaycastHit2D hit) diff --git a/ROUNDS/_Player/PlayerMovement.cs b/ROUNDS/_Player/PlayerMovement.cs index c4753c6..84dd5d0 100644 --- a/ROUNDS/_Player/PlayerMovement.cs +++ b/ROUNDS/_Player/PlayerMovement.cs @@ -31,6 +31,8 @@ public class PlayerMovement : MonoBehaviour return; } Move(data.input.direction); + +#if!IGNORE_DRAG if (data.isWallGrab && data.wallDistance < 0.7f) { Vector2 velocity = data.playerVel.velocity; @@ -44,7 +46,8 @@ public class PlayerMovement : MonoBehaviour // 和速度相反的空气阻力 data.playerVel.velocity -= data.playerVel.velocity * TimeHandler.timeScale * 0.01f * 0.1f * extraDrag * multiplier; data.playerVel.angularVelocity -= data.playerVel.angularVelocity * TimeHandler.timeScale * 0.01f * 0.1f * extraAngularDrag * multiplier; - } +#endif + } private void Update() { diff --git a/ROUNDS/bin/Debug/netstandard2.1/Assembly-CSharp.dll b/ROUNDS/bin/Debug/netstandard2.1/Assembly-CSharp.dll index 8ee191b..5d9c678 100644 Binary files a/ROUNDS/bin/Debug/netstandard2.1/Assembly-CSharp.dll and b/ROUNDS/bin/Debug/netstandard2.1/Assembly-CSharp.dll differ diff --git a/ROUNDS/bin/Debug/netstandard2.1/Assembly-CSharp.pdb b/ROUNDS/bin/Debug/netstandard2.1/Assembly-CSharp.pdb index b748500..89d1b62 100644 Binary files a/ROUNDS/bin/Debug/netstandard2.1/Assembly-CSharp.pdb and b/ROUNDS/bin/Debug/netstandard2.1/Assembly-CSharp.pdb differ diff --git a/ROUNDS/obj/Debug/netstandard2.1/Assembly-CSharp.dll b/ROUNDS/obj/Debug/netstandard2.1/Assembly-CSharp.dll index 8ee191b..5d9c678 100644 Binary files a/ROUNDS/obj/Debug/netstandard2.1/Assembly-CSharp.dll and b/ROUNDS/obj/Debug/netstandard2.1/Assembly-CSharp.dll differ diff --git a/ROUNDS/obj/Debug/netstandard2.1/Assembly-CSharp.pdb b/ROUNDS/obj/Debug/netstandard2.1/Assembly-CSharp.pdb index b748500..89d1b62 100644 Binary files a/ROUNDS/obj/Debug/netstandard2.1/Assembly-CSharp.pdb and b/ROUNDS/obj/Debug/netstandard2.1/Assembly-CSharp.pdb differ diff --git a/ROUNDS/obj/Debug/netstandard2.1/ROUNDS.csproj.CoreCompileInputs.cache b/ROUNDS/obj/Debug/netstandard2.1/ROUNDS.csproj.CoreCompileInputs.cache index 723adb5..59371bf 100644 --- a/ROUNDS/obj/Debug/netstandard2.1/ROUNDS.csproj.CoreCompileInputs.cache +++ b/ROUNDS/obj/Debug/netstandard2.1/ROUNDS.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -33474f73f933efdfb31f86b6b5137b0e424a5cf9 +79f9f757afc32c7e1628632fee8ea891bdd71bb0 -- cgit v1.1-26-g67d0