Inheritance: AkUnityEventHandler
Ejemplo n.º 1
0
    void CreateBank(Guid componentGuid, string name)
    {
        AkBank bank = Undo.AddComponent <AkBank>(gameObject);

        if (bank != null)
        {
            bank.valueGuid = componentGuid.ToByteArray();
            bank.bankName  = name;
        }
    }
Ejemplo n.º 2
0
    void CreateBank(AkDragDropData DDData)
    {
        AkBank bank = Undo.AddComponent <AkBank>(gameObject);

        if (bank != null)
        {
            int valueID = 0;
            SetTypeValue(ref bank.valueGuid, ref valueID, DDData);
            bank.bankName = DDData.name;
        }
    }
Ejemplo n.º 3
0
    void Awake()
    {
        soundBank = GetComponent <AkBank>();
        AudioData.audioManager = this;

        if (PlayerPrefs.GetInt("SoundMute") == 1)
        {
            SetSoundParameter(SoundParameterHandle.MasterVolume, 0);
            return;
        }
        SetSoundParameter(SoundParameterHandle.MasterVolume, PlayerPrefs.GetInt("SoundVolume"));
    }
Ejemplo n.º 4
0
    public void LoadSoundBank(string bankName)
    {
        for (int i = 0; i < _SoundBankList.Count; ++i)       //不重复加载
        {
            if (_SoundBankList[i] != null &&
                _SoundBankList[i].name == bankName)
            {
                return;
            }
        }

        GameObject go = new GameObject(bankName);

        AkBank akBank = go.AddComponent <AkBank>();

        akBank.bankName = bankName;

        go.transform.parent = BanksLoaded.transform;

        _SoundBankList.Add(akBank);
    }
Ejemplo n.º 5
0
        private void Awake()
        {
            bankObj = transform.GetChild(0);
            if (bankObj == null)
            {
                return;
            }
            AkBank[] akbankArray = bankObj.GetComponents <AkBank>();
            if (akbankArray == null || akbankArray.Length == 0)
            {
                return;
            }
            m_AkBankList = new List <AkBank>(akbankArray);

            for (int i = 0; i < m_AkBankList.Count; i++)
            {
                AkBank bank = m_AkBankList[i];
                bank.Completed = FirstBankListLoadOverDetector;
            }

            bankObj.gameObject.SetActive(true);
        }