public void OnPrepareFrame(Listener_EventArgs e) { if (m_prepareFrame != null) { m_prepareFrame.Invoke(); } if (m_prepareFrameEventHandle != null) { m_prepareFrameEventHandle(this, e); } }
public void OnGraphStop(Listener_EventArgs e) { if (m_graphStop != null) { m_graphStop.Invoke(); } if (m_graphStopEventHandle != null) { m_graphStopEventHandle(this, e); } }
public void OnGraphStart(Listener_EventArgs e) { if (m_graphStart != null) { m_graphStart.Invoke(); } if (m_graphStartEventHandle != null) { m_graphStartEventHandle(this, e); } }
public void OnBehaviourPause(Listener_EventArgs e) { if (m_behaviourPause != null) { m_behaviourPause.Invoke(); } if (m_behaviourPauseEventHandle != null) { m_behaviourPauseEventHandle(this, e); } }
public void OnBehaviourPlay(Listener_EventArgs e) { if (m_behaviourPlay != null) { m_behaviourPlay.Invoke(); } if (m_behaviourPlayEventHandle != null) { m_behaviourPlayEventHandle(this, e); } }
public override Playable CreatePlayable(PlayableGraph graph, GameObject owner) { var playable = ScriptPlayable <KaiTool_PlayableBehaviour> .Create(graph); var listener = m_eventListener.Resolve(graph.GetResolver()); playable.GetBehaviour().m_behaviourPlayEventHandle += (sender, e) => { if (listener) { var args = new Listener_EventArgs(); args.m_playable = e.m_playable; args.m_info = e.m_info; listener.OnBehaviourPlay(args); } }; playable.GetBehaviour().m_behaviourPauseEventHandle += (sender, e) => { // var listener = m_eventListener.Resolve(graph.GetResolver()); if (listener != null) { var args = new Listener_EventArgs(); args.m_playable = e.m_playable; args.m_info = e.m_info; listener.OnBehaviourPause(args); } }; playable.GetBehaviour().m_graphStartEventHandle += (sender, e) => { // var listener = m_eventListener.Resolve(graph.GetResolver()); if (listener) { var args = new Listener_EventArgs(); args.m_playable = e.m_playable; args.m_info = e.m_info; listener.OnGraphStart(args); } }; playable.GetBehaviour().m_graphStopEventHandle += (sender, e) => { //var listener = m_eventListener.Resolve(graph.GetResolver()); if (listener) { var args = new Listener_EventArgs(); args.m_playable = e.m_playable; args.m_info = e.m_info; listener.OnGraphStop(args); } }; playable.GetBehaviour().m_prepareFrameEventHandle += (sender, e) => { // var listener = m_eventListener.Resolve(graph.GetResolver()); if (listener) { var args = new Listener_EventArgs(); args.m_playable = e.m_playable; args.m_info = e.m_info; listener.OnPrepareFrame(args); } }; return(playable); }