コード例 #1
0
    public void RemoveCartridge(GameObject cartridge)
    {
        CartridgeJSONReader cartridgeScript = cartridge.GetComponent <CartridgeJSONReader>();

        if (cartridgeScript.GetCartridgeCompleteStatus() == true)
        {
            cartridgeCount--;
        }
    }
コード例 #2
0
    public void AddCartridge(GameObject cartridge)
    {
        CartridgeJSONReader cartridgeScript = cartridge.GetComponent <CartridgeJSONReader>();

        if (cartridgeScript.GetCartridgeCompleteStatus() == true)
        {
            correctAudio.Play();
            cartridgeCount++;
            if (cartridgeCount == totalCartridges)
            {
                OpenShelf();
            }
        }
        else
        {
            incorrectAudio.Play();
        }
    }