Пример #1
0
        public static Scene Create()
        {
            var graphicsService = ServiceLocator.Current.GetInstance<IGraphicsService>();
              var content = ServiceLocator.Current.GetInstance<ContentManager>();

              var screen = new MyGraphicsScreen(graphicsService);
              graphicsService.Screens.Add(screen);

              AddLights(screen.Scene);

              var groundModel = content.Load<ModelNode>("Ground/Ground").Clone();
              screen.Scene.Children.Add(groundModel);

              var tankModel = content.Load<ModelNode>("Tank/tank").Clone();
              screen.Scene.Children.Add(tankModel);

              return screen.Scene;
        }
Пример #2
0
        public static Scene Create()
        {
            var graphicsService = ServiceLocator.Current.GetInstance <IGraphicsService>();
            var content         = ServiceLocator.Current.GetInstance <ContentManager>();

            var screen = new MyGraphicsScreen(graphicsService);

            graphicsService.Screens.Add(screen);

            AddLights(screen.Scene);

            var groundModel = content.Load <ModelNode>("Ground/Ground").Clone();

            screen.Scene.Children.Add(groundModel);

            var tankModel = content.Load <ModelNode>("Tank/tank").Clone();

            screen.Scene.Children.Add(tankModel);

            return(screen.Scene);
        }