private void StopAllCommands() { int maxCalls = _commands.Count; while (_commands.Count > 0) { maxCalls--; _commands[0].Terminate(); if (maxCalls == 0) { break; } } if (_commands.Count != 0) { MonoLog.LogWarning(MonoLogChannel.Exceptions, "State machine does not finished all commands"); } /*for(int i = _commands.Count-1; i >= 0; i--) * { * _commands[i].Terminate(); * }*/ }
public T Get(string key) { if (!_items.ContainsKey(key)) { MonoLog.LogWarning(MonoLogChannel.Core, string.Format("Object with key {0} does not exists", key)); } return(_items[key]); }