Beispiel #1
0
        private void RemoveCommand(SceneRemoveCommandInfo command)
        {
            if (!objects.ContainsKey(command.Name))
            {
                throw new GameRunException(String.Format("The handler '{0}' referenced an object called '{1}', which doesn't exist.", Info.Name, command.Name));
            }

            objects[command.Name].Stop();
            objects.Remove(command.Name);
        }
 public SceneCommandInfo Load(XElement node, string basePath)
 {
     var info = new SceneRemoveCommandInfo();
     info.Name = node.RequireAttribute("name").Value;
     return info;
 }
 public static SceneRemoveCommandInfo FromXml(XElement node)
 {
     var info = new SceneRemoveCommandInfo();
     info.Name = node.RequireAttribute("name").Value;
     return info;
 }