Ejemplo n.º 1
0
        private void EffectCommand(SceneEffectCommandInfo command)
        {
            var entity = Entities.GetEntityById(command.EntityId);

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

            effect(entity);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 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);
        }