fixed tambourine
such a stupid issue omg i can't believe it took me this long to realize what was happening. also added transition music into the caverns
This commit is contained in:
@@ -8,7 +8,7 @@ public class PlayerBehavior : MonoBehaviour
|
||||
[Header("Physics:")]
|
||||
private float _hInput;
|
||||
private Rigidbody2D _rb;
|
||||
private int forward = 1;
|
||||
[HideInInspector] public int forward = 1;
|
||||
public PlayerInput playerInput;
|
||||
|
||||
[Header("Tambourine:")]
|
||||
@@ -382,9 +382,16 @@ public class PlayerBehavior : MonoBehaviour
|
||||
|
||||
// destroy all tambourines
|
||||
GameObject[] currentTambourines = GameObject.FindGameObjectsWithTag("tambourine");
|
||||
foreach (GameObject tambourine in currentTambourines) {
|
||||
tambourine.GetComponent<TambourineBehavior>().DestroySelf();
|
||||
// Destroy(tambourine);
|
||||
print("tambs found: " + currentTambourines.Length);
|
||||
if (currentTambourines != null) {
|
||||
foreach (GameObject tambourine in currentTambourines) {
|
||||
if (tambourine != null) {
|
||||
tambourine.GetComponent<TambourineBehavior>().DestroySelf();
|
||||
print("tamb destroyed");
|
||||
} else {
|
||||
print("null tamb");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StateController.Instance.RespawnPlayer();
|
||||
|
||||
Reference in New Issue
Block a user