private void EffectCommand(SceneEffectCommandInfo command)
        {
            var entity = Entities.GetEntityById(command.EntityId);

            var effect = EffectParser.GetOrLoadEffect(command.GeneratedName, command.EffectNode);

            effect(entity);
        }
        public static SceneEffectCommandInfo LoadEffectCommand(XElement node)
        {
            var info = new SceneEffectCommandInfo();

            info.GeneratedName = Guid.NewGuid().ToString();

            var attr = node.Attribute("entity");

            if (attr != null)
            {
                info.EntityId = attr.Value;
            }
            info.EffectNode = node;

            return(info);
        }
Beispiel #3
0
        public SceneCommandInfo Load(XElement node, string basePath)
        {
            var info = new SceneEffectCommandInfo();

            info.GeneratedName = Guid.NewGuid().ToString();

            var attr = node.Attribute("entity");

            if (attr != null)
            {
                info.EntityId = attr.Value;
            }

            info.EffectInfo = _effectReader.Load(node);

            return(info);
        }