private void LoadSpell()
 {
     if (string.IsNullOrEmpty(this.m_emoteSoundSpellPath))
     {
         Debug.LogWarning(string.Format("Could not load emote of type {0} as no sound asset was specified", this.m_emoteType));
     }
     else
     {
         GameObject obj2 = AssetLoader.Get().LoadSpell(this.m_emoteSoundSpellPath, true, false);
         if (obj2 != null)
         {
             this.m_emoteSoundSpell = obj2.GetComponent <CardSoundSpell>();
         }
         if (this.m_emoteSoundSpell == null)
         {
             if (AssetLoader.DOWNLOADABLE_LANGUAGE_PACKS == null)
             {
                 object[] messageArgs = new object[] { this.m_emoteSoundSpellPath, this.m_emoteType };
                 Error.AddDevFatal("EmoteEntry.LoadSpell() - FAILED TO LOAD \"{0}\" (emoteType {1})", messageArgs);
             }
         }
         else if (this.m_initSpellFunc != null)
         {
             this.m_initSpellFunc(this.m_emoteSoundSpell);
         }
     }
 }
 public void Clear()
 {
     if (this.m_emoteSoundSpell != null)
     {
         UnityEngine.Object.Destroy(this.m_emoteSoundSpell.gameObject);
         this.m_emoteSoundSpell = null;
     }
 }
 private void OnPickEmoteLoaded(CardSoundSpell spell)
 {
     if (spell != null)
     {
         spell.AddFinishedCallback(new Spell.FinishedCallback(this.OnPickEmoteFinished));
         spell.Reactivate();
     }
 }
Exemple #4
0
 private void OnStartEmoteLoaded(string name, GameObject go, object callbackData)
 {
     if (go != null)
     {
         CardSoundSpell component = go.GetComponent <CardSoundSpell>();
         if (component != null)
         {
             this.m_emote = component;
         }
     }
 }