void OnTriggerEnter(Collider other) { if (inventory.idolStatus()) { audio.PlayOneShot(idolDepositSfx, 1.0F); inventory.idolCarryToggle(); inventory.currentLevel += 1; Debug.Log("Current Level (from altar): " + inventory.currentLevel); levelSpawn.spawn(inventory.currentLevel); } }
void OnTriggerEnter(Collider other) { if (inventory.currentLevel == 0) { Debug.Log("Current Level (from idol): " + inventory.currentLevel); levelSpawn.spawn(inventory.currentLevel); } Destroy(gameObject); inventory.idolCarryToggle(); }