public void RemoveCartridge(GameObject cartridge) { CartridgeJSONReader cartridgeScript = cartridge.GetComponent <CartridgeJSONReader>(); if (cartridgeScript.GetCartridgeCompleteStatus() == true) { cartridgeCount--; } }
public void AddCartridge(GameObject cartridge) { CartridgeJSONReader cartridgeScript = cartridge.GetComponent <CartridgeJSONReader>(); if (cartridgeScript.GetCartridgeCompleteStatus() == true) { correctAudio.Play(); cartridgeCount++; if (cartridgeCount == totalCartridges) { OpenShelf(); } } else { incorrectAudio.Play(); } }