summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchai <215380520@qq.com>2023-10-29 21:22:13 +0800
committerchai <215380520@qq.com>2023-10-29 21:22:13 +0800
commited42b67e0f518f6315370b29beebd49e47350450 (patch)
treed0824fdec94bcb0b6888d7b7c5d4fed636b4d630
parentac72b10c87c1e11324cad4377959c9cc1b7f8985 (diff)
*misc
-rw-r--r--Doc/ROUNDS分析.xlsxbin10740153 -> 11580685 bytes
-rw-r--r--ROUNDS/.vs/ROUNDS/v17/.suobin214016 -> 214528 bytes
-rw-r--r--ROUNDS/_Player/LegRaycasters.cs4
-rw-r--r--ROUNDS/_Player/PlayerCollision.cs79
-rw-r--r--ROUNDS/_Player/PlayerMovement.cs12
-rw-r--r--ROUNDS/bin/Debug/netstandard2.1/Assembly-CSharp.dllbin909312 -> 907776 bytes
-rw-r--r--ROUNDS/bin/Debug/netstandard2.1/Assembly-CSharp.pdbbin487088 -> 486436 bytes
-rw-r--r--ROUNDS/obj/Debug/netstandard2.1/Assembly-CSharp.dllbin909312 -> 907776 bytes
-rw-r--r--ROUNDS/obj/Debug/netstandard2.1/Assembly-CSharp.pdbbin487088 -> 486436 bytes
9 files changed, 48 insertions, 47 deletions
diff --git a/Doc/ROUNDS分析.xlsx b/Doc/ROUNDS分析.xlsx
index beb0760..bed2132 100644
--- a/Doc/ROUNDS分析.xlsx
+++ b/Doc/ROUNDS分析.xlsx
Binary files differ
diff --git a/ROUNDS/.vs/ROUNDS/v17/.suo b/ROUNDS/.vs/ROUNDS/v17/.suo
index 8d8f70d..933d54b 100644
--- a/ROUNDS/.vs/ROUNDS/v17/.suo
+++ b/ROUNDS/.vs/ROUNDS/v17/.suo
Binary files differ
diff --git a/ROUNDS/_Player/LegRaycasters.cs b/ROUNDS/_Player/LegRaycasters.cs
index fa3066e..db65cf1 100644
--- a/ROUNDS/_Player/LegRaycasters.cs
+++ b/ROUNDS/_Player/LegRaycasters.cs
@@ -37,7 +37,7 @@ public class LegRaycasters : MonoBehaviour
//! ҪýɫվڵϣȥģܲʱһһµĸЧҪҪplayercollisionfixedupdate)
// PlayerCollisionFixedUpdate
- // ؼTouchGroundaddforceؼ
+ // ؼTouchGroundaddforceؼվڵʱgravityΪ0
private void FixedUpdate()
{
totalStepTime = 0f;
@@ -67,7 +67,7 @@ public class LegRaycasters : MonoBehaviour
{
if (!(data.sinceJump < 0.2f) && !(Vector3.Angle(Vector3.up, hit.normal) > 70f))
{
- // touch ground Ҫ
+ // touch ground ҪӰŵغgravityΪ0
data.TouchGround(hit.point, hit.normal, hit.rigidbody);
// ʩϵ
diff --git a/ROUNDS/_Player/PlayerCollision.cs b/ROUNDS/_Player/PlayerCollision.cs
index 612f8e0..c6f2750 100644
--- a/ROUNDS/_Player/PlayerCollision.cs
+++ b/ROUNDS/_Player/PlayerCollision.cs
@@ -52,38 +52,38 @@ public class PlayerCollision : MonoBehaviour
private void FixedUpdate()
{
- #region ǽ͵޹أҲйأ
- if (checkForGoThroughWall && ignoreWallFor <= 0)
- {
- RaycastHit2D raycastHit2D = default(RaycastHit2D);
- RaycastHit2D[] array = Physics2D.RaycastAll(lastPos, (Vector2)base.transform.position - lastPos, Vector2.Distance(base.transform.position, lastPos), mask);
- for (int i = 0; i < array.Length; i++)
- {
- if (!(array[i].transform.root == base.transform.root))
- {
- Debug.DrawLine(lastPos, array[i].point, Color.green, 1f);
- if (!(Vector2.Angle(array[i].normal, (Vector2)base.transform.position - lastPos) < 90f) && (!raycastHit2D.transform || array[i].distance < raycastHit2D.distance))
- {
- raycastHit2D = array[i];
- }
- }
- }
- if ((bool)raycastHit2D)
- {
- base.transform.position = raycastHit2D.point + raycastHit2D.normal * 0.5f;
- if (data.healthHandler.flyingFor > 0f)
- {
- DoBounce(raycastHit2D);
- }
- }
- }
- #endregion
+ #region ǽ͵޹أҲйأ
+ if (checkForGoThroughWall && ignoreWallFor <= 0)
+ {
+ RaycastHit2D raycastHit2D = default(RaycastHit2D);
+ RaycastHit2D[] array = Physics2D.RaycastAll(lastPos, (Vector2)base.transform.position - lastPos, Vector2.Distance(base.transform.position, lastPos), mask);
+ for (int i = 0; i < array.Length; i++)
+ {
+ if (!(array[i].transform.root == base.transform.root))
+ {
+ Debug.DrawLine(lastPos, array[i].point, Color.green, 1f);
+ if (!(Vector2.Angle(array[i].normal, (Vector2)base.transform.position - lastPos) < 90f) && (!raycastHit2D.transform || array[i].distance < raycastHit2D.distance))
+ {
+ raycastHit2D = array[i];
+ }
+ }
+ }
+ if ((bool)raycastHit2D)
+ {
+ base.transform.position = raycastHit2D.point + raycastHit2D.normal * 0.5f;
+ if (data.healthHandler.flyingFor > 0f)
+ {
+ DoBounce(raycastHit2D);
+ }
+ }
+ }
+ #endregion
- #region ײ
- ignoreWallFor--;
+ #region ײ
+ ignoreWallFor--;
lastPos = base.transform.position;
float realRadius = cirCol.radius * base.transform.localScale.x;
- float innerRadius = cirCol.radius * base.transform.localScale.x * 0.75f;
+ float innerRadius = cirCol.radius * base.transform.localScale.x * 0.75f; //
// circlecolliderλúʹСΪοײ
RaycastHit2D[] array2 = Physics2D.CircleCastAll(lastPos, realRadius, (Vector2)base.transform.position - lastPos, Vector2.Distance(base.transform.position, lastPos), mask);
for (int j = 0; j < array2.Length; j++)
@@ -107,18 +107,19 @@ public class PlayerCollision : MonoBehaviour
component.Push(data);
}
- if (vel.simulated || !vel.isKinematic)
+ //! ѽɫ
+ if (vel.simulated || !vel.isKinematic) // true
{
- vel.transform.position += (Vector3)dirFromHitpoint * innerPushAmount; // ѽɫ
- if (Mathf.Abs(dirFromHitpoint.y) < 0.45f && Mathf.Abs(data.input.direction.x) > 0.1f && Vector3.Angle(data.input.direction, dirFromHitpoint) > 90f)
- {
- data.TouchWall(dirFromHitpoint, point);
- }
- vel.velocity += dirFromHitpoint * realPushAmount * 10f * TimeHandler.timeScale;
- vel.velocity -= vel.velocity * realPushAmount * 1f * TimeHandler.timeScale;
- }
+ vel.transform.position += (Vector3)dirFromHitpoint * innerPushAmount; // ǺҪע͵
+ if (Mathf.Abs(dirFromHitpoint.y) < 0.45f && Mathf.Abs(data.input.direction.x) > 0.1f && Vector3.Angle(data.input.direction, dirFromHitpoint) > 90f)
+ {
+ data.TouchWall(dirFromHitpoint, point);
+ }
+ vel.velocity += dirFromHitpoint * realPushAmount * 10f * TimeHandler.timeScale;
+ vel.velocity -= vel.velocity * realPushAmount * 1f * TimeHandler.timeScale;
+ }
- Player componentInParent = array2[j].transform.GetComponentInParent<Player>();
+ Player componentInParent = array2[j].transform.GetComponentInParent<Player>();
if (componentInParent != null && collideWithPlayerAction != null)
{
collideWithPlayerAction(point, realPushAmount * dirFromHitpoint, componentInParent);
diff --git a/ROUNDS/_Player/PlayerMovement.cs b/ROUNDS/_Player/PlayerMovement.cs
index 39dc27e..c4753c6 100644
--- a/ROUNDS/_Player/PlayerMovement.cs
+++ b/ROUNDS/_Player/PlayerMovement.cs
@@ -39,14 +39,14 @@ public class PlayerMovement : MonoBehaviour
_ = data.input.direction.x;
_ = 0f;
}
- data.playerVel.velocity = velocity;
+ data.playerVel.velocity = velocity;//Ҫ
}
- // ٶ෴Ŀ
- 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;
- }
+ // ٶ෴Ŀ
+ 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;
+ }
- private void Update()
+ private void Update()
{
}
diff --git a/ROUNDS/bin/Debug/netstandard2.1/Assembly-CSharp.dll b/ROUNDS/bin/Debug/netstandard2.1/Assembly-CSharp.dll
index d09f77a..8ee191b 100644
--- a/ROUNDS/bin/Debug/netstandard2.1/Assembly-CSharp.dll
+++ b/ROUNDS/bin/Debug/netstandard2.1/Assembly-CSharp.dll
Binary files differ
diff --git a/ROUNDS/bin/Debug/netstandard2.1/Assembly-CSharp.pdb b/ROUNDS/bin/Debug/netstandard2.1/Assembly-CSharp.pdb
index 867765c..b748500 100644
--- a/ROUNDS/bin/Debug/netstandard2.1/Assembly-CSharp.pdb
+++ b/ROUNDS/bin/Debug/netstandard2.1/Assembly-CSharp.pdb
Binary files differ
diff --git a/ROUNDS/obj/Debug/netstandard2.1/Assembly-CSharp.dll b/ROUNDS/obj/Debug/netstandard2.1/Assembly-CSharp.dll
index d09f77a..8ee191b 100644
--- a/ROUNDS/obj/Debug/netstandard2.1/Assembly-CSharp.dll
+++ b/ROUNDS/obj/Debug/netstandard2.1/Assembly-CSharp.dll
Binary files differ
diff --git a/ROUNDS/obj/Debug/netstandard2.1/Assembly-CSharp.pdb b/ROUNDS/obj/Debug/netstandard2.1/Assembly-CSharp.pdb
index 867765c..b748500 100644
--- a/ROUNDS/obj/Debug/netstandard2.1/Assembly-CSharp.pdb
+++ b/ROUNDS/obj/Debug/netstandard2.1/Assembly-CSharp.pdb
Binary files differ