public void Add(MovieEventHandlers handlers) { if (handlers == null) { return; } handlers.load.ForEach(h => load.Add(h)); handlers.postLoad.ForEach(h => postLoad.Add(h)); handlers.unload.ForEach(h => unload.Add(h)); handlers.enterFrame.ForEach(h => enterFrame.Add(h)); handlers.update.ForEach(h => update.Add(h)); handlers.render.ForEach(h => render.Add(h)); UpdateEmpty(); }
public void Add( MovieEventHandler l = null, MovieEventHandler p = null, MovieEventHandler u = null, MovieEventHandler e = null, MovieEventHandler up = null, MovieEventHandler r = null) { if (l != null) { load.Add(l); } if (p != null) { postLoad.Add(p); } if (u != null) { unload.Add(u); } if (e != null) { enterFrame.Add(e); } if (up != null) { update.Add(up); } if (r != null) { render.Add(r); } }