Esempio n. 1
0
        public AKEventAtom RegisterGetEvt(AudioEventItem config)
        {
            AKEventAtom evt;

            if (!events.TryGetValue(config.Id, out evt))
            {
                evt = new AKEventAtom(config);
                events.Add(config.Id, evt);
            }
            return(evt);
        }
Esempio n. 2
0
 private void PostEventFinalHandler(AKEventAtom atom, GameObject target, bool firstPlayInObject)
 {
     //get switch
     if (firstPlayInObject && atom.attachedGrps.Count > 0)
     {
         foreach (int grp in atom.attachedGrps)
         {
             RegisterGetSwitch(target, grp);
         }
     }
     AkSoundEngine.PostEvent(atom.evtName, target);
 }
Esempio n. 3
0
        private void PostEventFinalHandler(AKEventAtom atom, GameObject target, bool firstPlayInObject)
        {
            //get switch
            if (firstPlayInObject && atom.attachedGrps.Count > 0)
            {
                foreach (int grp in atom.attachedGrps)
                {
                    RegisterGetSwitch(target, grp);
                }
            }
#if UNITY_EDITOR
            if (GlobalConst.EnableAudioLog)
            {
                DebugUtil.MyLog("Real Post Event:" + atom.evtName);
            }
#endif
            AkSoundEngine.PostEvent(atom.evtName, target);
        }
Esempio n. 4
0
        private void LoadResultHandler(BankLoadResponseStruct response)
        {
            if (!response.loadResult.Sucess())
            {
                AudioUtil.ELog("result:{0} bank name:{1}", response.loadResult, response.bnkName);
                return;
            }
            //get bank post -> loadresult->bank.register
            if (response.loadResult == AKRESULT.AK_Success)
            {
                response.atom.Register(response.target);
            }
            //get evt
            AKEventAtom evtAtom = typesController.RegisterGetEvt((AudioEventItem)response.userData);

            //get bank
            evtAtom.PostEvent(response.target);
        }