Ejemplo n.º 1
0
        private static MenuStateInfo LoadMenuState(XElement node, string basePath)
        {
            var info = new MenuStateInfo();

            info.Name = node.RequireAttribute("name").Value;

            info.Fade = node.TryAttribute<bool>("fade");

            var startNode = node.Element("SelectOption");
            if (startNode != null)
            {
                var startNameAttr = startNode.Attribute("name");
                var startVarAttr = startNode.Attribute("var");

                if (startNameAttr != null)
                {
                    info.StartOptionName = startNameAttr.Value;
                }

                if (startVarAttr != null)
                {
                    info.StartOptionVar = startVarAttr.Value;
                }
            }

            info.Commands = LoadCommands(node, basePath);

            return info;
        }
Ejemplo n.º 2
0
        public override void StartHandler(IEntityPool entityPool)
        {
            base.StartHandler(entityPool);

            this.state = this.info.States[0];
            RunCommands(this.state.Commands);

            ResetState();
        }
Ejemplo n.º 3
0
        public static MenuStateInfo FromXml(XElement node, string basePath)
        {
            var info = new MenuStateInfo();

            info.Name = node.RequireAttribute("name").Value;

            bool fade = false;
            node.TryBool("fade", out fade);
            info.Fade = fade;

            info.Commands = SceneCommandInfo.Load(node, basePath);

            return info;
        }