GetAudioSource() public méthode

public GetAudioSource ( string name ) : AudioSource
name string
Résultat UnityEngine.AudioSource
 static public int GetAudioSource(IntPtr l)
 {
     try {
         GameFramework.Skill.Trigers.AudioManager self = (GameFramework.Skill.Trigers.AudioManager)checkSelf(l);
         System.String a1;
         checkType(l, 2, out a1);
         var ret = self.GetAudioSource(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemple #2
0
        public override bool Execute(object sender, SkillInstance instance, long delta, long curSectionTime)
        {
            GfxSkillSenderInfo senderObj = sender as GfxSkillSenderInfo;

            if (null == senderObj)
            {
                return(false);
            }
            GameObject obj = senderObj.GfxObj;

            if (null == obj)
            {
                return(false);
            }
            if (null != senderObj.TrackEffectObj)
            {
                obj = senderObj.TrackEffectObj;
            }
            if (curSectionTime < StartTime)
            {
                return(true);
            }
            if (obj.GetComponentInChildren <AudioSource>() == null)
            {
                return(false);
            }
            AudioManager mgr = instance.CustomDatas.GetData <AudioManager>();

            if (mgr == null)
            {
                return(false);
            }
            AudioSource source = mgr.GetAudioSource(m_Name);

            if (source != null)
            {
                source.Stop();
            }
            return(false);
        }