public void OnTextEntered(MoonSharp.Interpreter.Closure handler) { TextEntered += (s) => { handler.Call(s); }; }
public void OnUpdate(MoonSharp.Interpreter.Closure handler) { callback += (x) => { handler.Call(x); }; }
public List <Music> Query(Playlist play, MoonSharp.Interpreter.Closure func) { var temp = new List <Music>(); foreach (Music m in play.music) { var tags = getTag(m); var filename = m.Filename; try { var truth = func.Call(filename, tags).CastToBool(); if (truth) { temp.Add(m); } } catch (Exception e) { //eventually print to internal console } } return(temp); }