Add() public méthode

public Add ( Command cmd ) : void
cmd Command
Résultat void
Exemple #1
0
        internal void AddCommand(Command command)
        {
            buffer.Add(command);

            var evt = CommandDetected;

            if (evt != null)
            {
                evt(command);
            }

            var matched = buffer.FindEggs(Eggs);

            if (matched == null)
            {
                return;
            }

            foreach (var m in matched)
            {
                var evt2 = EggDetected;
                if (evt2 != null)
                {
                    evt2(m);
                }
            }
        }