예제 #1
0
 override public void Sync()
 {
     for (int indexCommand = 0; indexCommand < this.commands.Count; indexCommand++)
     {
         InputCommand command = this.commands[indexCommand];
         command.Sync();
     }
 }
예제 #2
0
        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();
                }
            }
        }