public Timing(IInterpreter <Closure> interpreter, GameState gameState) { _gameState = gameState; interpreter.AddFunction("GetDeltaTime", (Func <float>)GetDeltaTime); interpreter.AddFunction("GetTotalTime", (Func <float>)GetTime); }
public EventConditions(IInterpreter <Closure> interpreter, GameState gameState) { _player = gameState.Player; interpreter.AddFunction("_FlagCondition", (Func <string, bool, bool>)CheckFlag); interpreter.AddFunction("_VarCondition", (Func <string, Equality, object, bool>)CheckVariable); interpreter.AddType <Equality>("Equality"); }
public EventTriggers(IInterpreter <Closure> interpreter, ISignal signal, GameState gameState) { _interpreter = interpreter; _signal = signal; _player = gameState.Player; interpreter.AddFunction("Subscribe", (Action <Table>)CreateEvent); interpreter.AddFunction("Notify", (Action <string>)Notify); }
public Player(IInterpreter <Closure> interpreter, GameState gameState) { _player = gameState.Player; interpreter.AddFunction("Lock", (Action)LockMovement); interpreter.AddFunction("Unlock", (Action)UnlockMovement); interpreter.AddFunction("Flag", (Func <string, bool?, bool>)Flag); interpreter.AddFunction("Var", (Func <string, IComparable, object>)Var); interpreter.AddFunction("Save", (Action)Save); }
public GameObject(IInterpreter <Closure> interpreter, GameState gameState, Stage stage) { _gameState = gameState; _stage = stage; interpreter.AddFunction("Player", (Func <string>)GetPlayer); interpreter.AddFunction("GameObject", (Func <string, string>)GetGameObjectByName); interpreter.AddFunction("GameObjectsByTag", (Func <string, IEnumerable <string> >)GetGameObjectsByTag); interpreter.AddFunction("_Move", (Func <string, Vector2, float, bool>)Move); interpreter.AddType <Vector2>("Vector2"); interpreter.RegisterGlobal("Vector2", (Func <float, float, Vector2>)CreateVector2); interpreter.AddFunction("Warp", (Action <string, Vector2>)Warp); }
public Text(IInterpreter <Closure> interpreter, ITextDatabase textDatabase) { _textDatabase = textDatabase; interpreter.AddFunction("Text", (Func <string, string>)GetText); }