예제 #1
0
            public BackgroundStruct(Cll.JSON.Object background)
            {
                string[] size     = ((Cll.JSON.String)background.GetFirstValue("size")).Value.Split(new char[] { ' ' });
                string[] position = ((Cll.JSON.String)background.GetFirstValue("position")).Value.Split(new char[] { ' ' });

                Position = new Point(Convert.ToInt32(position[0]), Convert.ToInt32(position[1]));
                Rotation = Convert.ToInt32(((Cll.JSON.Number)background.GetFirstValue("rotation")).Value);
                Resource = ((Cll.JSON.String)background.GetFirstValue("resource")).Value;
                Target   = ((Cll.JSON.String)background.GetFirstValue("target")).Value;
                Size     = new Size(Convert.ToInt32(size[0]), Convert.ToInt32(size[1]));
            }
예제 #2
0
            public ScreenStruct(Cll.JSON.Object screen)
            {
                string[] size     = ((Cll.JSON.String)screen.GetFirstValue("size")).Value.Split(new char[] { ' ' });
                string[] position = ((Cll.JSON.String)screen.GetFirstValue("position")).Value.Split(new char[] { ' ' });

                Source   = ((Cll.JSON.String)screen.GetFirstValue("source")).Value;
                Rotation = Convert.ToInt32(((Cll.JSON.Number)screen.GetFirstValue("rotation")).Value);
                Size     = new Size(Convert.ToInt32(size[0]), Convert.ToInt32(size[1]));
                Target   = ((Cll.JSON.String)screen.GetFirstValue("target")).Value;
                Position = new Point(Convert.ToInt32(position[0]), Convert.ToInt32(position[1]));
            }