Ejemplo n.º 1
0
        public ActionResult StarMap(ClientData clientData)
        {
            var top          = clientData.Top > 1000 ? clientData.Top - 1000 : 1;
            var left         = clientData.Left > 1000 ? clientData.Left - 1000 : 1;
            var width        = clientData.Width + 1000;
            var height       = clientData.Height + 1000;
            var visibleStars = CelestialManager.GetVisibleStars(top, left, width, height, new Position()
            {
                X = clientData.Left, Y = clientData.Top
            });

            return(Json(visibleStars));
        }
Ejemplo n.º 2
0
        public ActionResult StarMap()
        {
            var homeSystemjson = CelestialManager.GetHomeSystem();
            var star           = JsonConvert.DeserializeObject <Star>(homeSystemjson);

            return(View(new ClusterInfo()
            {
                HomeSystemPosition = new Position()
                {
                    X = star.X, Y = star.Y
                }, ClusterName = "test", HomeSystemName = star.Name
            }));
        }