//----------------------------------------------------------------------------- // Commands //----------------------------------------------------------------------------- protected void AddCommand(string name, Action<CommandParam> action) { // Don't add commands that already exist. for (int i = 0; i < commands.Count; i++) { if (String.Compare(commands[i].Name, name, StringComparison.CurrentCultureIgnoreCase) == 0) return; } ScriptCommand command = new ScriptCommand(name, action); commands.Add(command); }
private void AddSpriteCommand(string name, Action<CommandParam> action) { ScriptCommand command = new ScriptCommand(name, action); spriteCommands.Add(command); }
private void AddTilesetCommand(string name, Action<CommandParam> action) { ScriptCommand command = new ScriptCommand(name, action); tilesetCommands.Add(command); }
private void AddAnimationCommand(string name, Action<CommandParam> action) { ScriptCommand command = new ScriptCommand(name, action); animationCommands.Add(command); }