Merge remote-tracking branch 'origin/main' into main

This commit is contained in:
Xiao Qi 2023-02-04 02:39:37 +08:00
commit 1f7f86dd01
6 changed files with 932 additions and 650 deletions

View File

@ -1,10 +1,10 @@
0 1 0000000000000000
1 2 0000000000000000
2 3 0000000000000000
3 4 0000000000000000
4 5 0000000000000000
5 6 0000000000000000
6 7 0000000000000000
0 StaticObject 1100000000000000
1 Player 1100000000000000
2 Food 1000000000000000
3 Breakable 1100000000000000
4 ScoringWallCollider 0100000000000000
5 Homeowner 1100000000000000
6 Camera 1100000000000000
7 8 0000000000000000
8 9 0000000000000000
9 10 0000000000000000

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -12,6 +12,7 @@ public class Breakable : Script
private Transform trans;
public bool isBreak { get; set; }
private List<GameObject> itemPieces = new List<GameObject>();
public bool print = false;
protected override void awake()
{
@ -43,6 +44,9 @@ public class Breakable : Script
if (ignoreRaccoon && info.GameObject.GetScript<PlayerController>())
return;
if (print)
Debug.Log($"{info.GameObject.Name}");
if (rb.LinearVelocity.GetSqrMagnitude() > threshHold && !info.GameObject.GetScript<PlayerController>())
{
isBreak = true;

View File

@ -151,6 +151,8 @@ public class PlayerController : Script
camArm = GetComponentInChildren<CameraArm>();
Rotation();
MoveKey();
Sprint();
Jump();
GotCaught();
//Debug.Log($"{currentState}");
@ -161,10 +163,7 @@ public class PlayerController : Script
protected override void fixedUpdate()
{
MoveKey();
Move();
Sprint();
Gravity();
//Debug.Log($"X: {rb.LinearVelocity.x}" + $" Z: {rb.LinearVelocity.z}");
}

View File

@ -9,11 +9,11 @@ public class ScoringZone : Script
protected override void onTriggerEnter(CollisionInfo info)
{
if (GameManager.Instance && info.GameObject.GetScript<Item>())
if (GameManager.Instance && info.GameObject.GetScript<Item>() && info.GameObject.IsActiveSelf)
{
Audio.PlaySFXOnce2D("event:/Music/stingers/item_scored");
GameManager.Instance.ItemScored();
GameManager.Instance.Score += info.GameObject.GetScript<Item>().Score * GameManager.Instance.currMultiplierCombo;
GameManager.Instance.ItemScored();
info.GameObject.SetActive(false);
}
}