override public void Sync()
 {
     for (int indexCommand = 0; indexCommand < this.commands.Count; indexCommand++)
     {
         InputCommand command = this.commands[indexCommand];
         command.Sync();
     }
 }
        public void Sync(CommandMap prevMap)
        {
            for (int indexCommand = 0; indexCommand < this.commands.Count; indexCommand++)
            {
                bool clone = false;

                InputCommand command = this.commands[indexCommand];
                if (prevMap != null)
                {
                    // if we have a previous active map
                    // check if this inputCommand was in it already
                    clone = prevMap.commands.Contains(command);
                }
                // do not call sync on an inputCommand that was just active
                if (!clone && (command != null))
                {
                    command.Sync();
                }
            }
        }