Exemplo n.º 1
0
        public static BackItem LoadFromNode(Wz_Node node)
        {
            var item = new BackItem()
            {
                BS       = node.Nodes["bS"].GetValueEx <string>(null),
                Ani      = node.Nodes["ani"].GetValueEx <int>(0),
                No       = node.Nodes["no"].GetValueEx <string>(null),
                SpineAni = node.Nodes["spineAni"].GetValueEx <string>(null),

                X     = node.Nodes["x"].GetValueEx(0),
                Y     = node.Nodes["y"].GetValueEx(0),
                Cx    = node.Nodes["cx"].GetValueEx(0),
                Cy    = node.Nodes["cy"].GetValueEx(0),
                Rx    = node.Nodes["rx"].GetValueEx(0),
                Ry    = node.Nodes["ry"].GetValueEx(0),
                Alpha = node.Nodes["a"].GetValueEx(255),

                TileMode   = GetBackTileMode(node.Nodes["type"].GetValueEx(0)),
                ScreenMode = node.Nodes["screenMode"].GetValueEx(0),
                Flip       = node.Nodes["f"].GetValueEx(false),
                IsFront    = node.Nodes["front"].GetValueEx(false),
            };
            string backTags = node.Nodes["backTags"].GetValueEx <string>(null);

            if (!string.IsNullOrWhiteSpace(backTags))
            {
                item.Tags = backTags.Split(',').Select(tag => tag.Trim()).ToArray();
            }
            return(item);
        }
Exemplo n.º 2
0
        public static BackItem LoadFromNode(Wz_Node node)
        {
            var item = new BackItem()
            {
                BS       = node.Nodes["bS"].GetValueEx <string>(null),
                Ani      = node.Nodes["ani"].GetValueEx <int>(0),
                No       = node.Nodes["no"].GetValueEx <string>(null),
                SpineAni = node.Nodes["spineAni"].GetValueEx <string>(null),

                X     = node.Nodes["x"].GetValueEx(0),
                Y     = node.Nodes["y"].GetValueEx(0),
                Cx    = node.Nodes["cx"].GetValueEx(0),
                Cy    = node.Nodes["cy"].GetValueEx(0),
                Rx    = node.Nodes["rx"].GetValueEx(0),
                Ry    = node.Nodes["ry"].GetValueEx(0),
                Alpha = node.Nodes["a"].GetValueEx(255),

                TileMode   = GetBackTileMode(node.Nodes["type"].GetValueEx(0)),
                ScreenMode = node.Nodes["screenMode"].GetValueEx(0),
                Flip       = node.Nodes["f"].GetValueEx(false),
                IsFront    = node.Nodes["front"].GetValueEx(false),
            };

            return(item);
        }