Example #1
0
 public void UnregisterEventHandler(int id, UnityEngine.Events.UnityAction <GameObject, string> on_event)
 {
     for (int i = 0; i < UiAinm.Length; i++)
     {
         GUIAnim g_anim = UiAinm[id];
         if (g_anim != null)
         {
             g_anim.OnSequenceEvent -= on_event;
         }
     }
 }
Example #2
0
        public float PlaySequence(int id, string seq_name, UnityEngine.Events.UnityAction <GameObject, string> on_finish)
        {
            SafeInit();
            float ret = -1;

            if (id > -1 && id < UiAinm.Length)
            {
                GUIAnim g_anim = UiAinm[id];
                if (g_anim)
                {
                    g_anim.StopSequence();

                    g_anim.OnSequenceEnd = on_finish;
                    ret = g_anim.PlaySequence(seq_name);
                }
            }
            return(ret);
        }