public void RemoveListener(string in_name, AnimationEventDelegate in_onEvent) { if (m_arEventListeners.ContainsKey(in_name)) { m_arEventListeners[in_name] -= in_onEvent; } }
public void Init(AnimationEventDelegate e) { _skAniData = SpineAniController.Instance.GetSpineAniData(_skAnima.name); Event = e; _curEventList.Clear(); //if (_skAnima != null) // _skAnima.state.Event += OnAnimaEvent; }
// Public methods. public void AddListener(string in_name, AnimationEventDelegate in_onEvent) { if (!m_arEventListeners.ContainsKey(in_name)) { m_arEventListeners.Add(in_name, null); } m_arEventListeners[in_name] += in_onEvent; }
/// <summary> /// Playback timer has elapsed /// </summary> void m_playbackTimer_Elapsed(object sender, ElapsedEventArgs e) { m_playbackTimer.Enabled = false; m_playbackSequence++; // Find the visualization events that fall within this time frame lock (m_visEvents) { var visualizationEvents = m_visEvents.FindAll(o => o.Sequence == m_playbackSequence); foreach (var ev in visualizationEvents) { AnimationEventDelegate del = new AnimationEventDelegate(AnimateDiagram); this.Dispatcher.BeginInvoke(del, new object[] { ev }); } m_playbackTimer.Enabled = true; } }
void OnDestroy() { luaHandler = null; }
public bool SetAnimEventCb(AnimationEventDelegate animationEventDelegate) { return(avatarAnimation.SetAnimationEventDelegate(animationEventDelegate)); }
public void Clear() { Event = null; //if (_skAnima != null) // _skAnima.state.Event -= OnAnimaEvent; }