Пример #1
0
        //-----------------------------------------------------------------------------
        // 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);
        }
Пример #2
0
 private void AddSpriteCommand(string name, Action<CommandParam> action)
 {
     ScriptCommand command = new ScriptCommand(name, action);
     spriteCommands.Add(command);
 }
Пример #3
0
 private void AddTilesetCommand(string name, Action<CommandParam> action)
 {
     ScriptCommand command = new ScriptCommand(name, action);
     tilesetCommands.Add(command);
 }
Пример #4
0
 private void AddAnimationCommand(string name, Action<CommandParam> action)
 {
     ScriptCommand command = new ScriptCommand(name, action);
     animationCommands.Add(command);
 }