This component should be attached to a GameObject in the "Startup" scene to take the player directly to the main menu. The point of the Starup scene is to ensure that the NetworkLevelLoader game object exists once and only once throughout all scenes without requiring a dynamic creation through a call to Instantiate. Because the NetworkLevelLoader component is set to DontDestroyOnLoad, we must be sure to never again revisit the scene it was created in or else it will duplicate.
Inheritance: MonoBehaviour
Ejemplo n.º 1
0
        protected override void Initialize()
        {
            ActualScene = new StartupScene();

            graphics.PreferredBackBufferWidth  = 800;
            graphics.PreferredBackBufferHeight = 600;
            graphics.ApplyChanges();

            base.Initialize();
        }
Ejemplo n.º 2
0
        public static void Init()
        {
            //Init the game
            Win = new Window(1280, 720, "NS Tech 2D");
            Win.SetVSync(true);
            Win.SetDefaultOrthographicSize(720);
            OptimalScreenHeight = 1080;

            UnitSize        = Win.Height / Win.OrthoHeight;
            OptimalUnitSize = OptimalScreenHeight / Win.OrthoHeight;

            //Setup scenes
            StartupScene startupScene = new StartupScene();

            startupScene.nextScene = null;
            currentScene           = startupScene;
        }