コード例 #1
0
        // Go to World Scene
        public static void ToWorld(string worldId, bool finalTest = false)
        {
            GameHandler handler = Systems.handler;

            // If we're already in a World Scene, verify that we're loading a different world from our current one.
            if (Systems.scene is WorldScene && worldId == handler.worldContent.worldId)
            {
                return;
            }

            // Get World Path & Retrieve World Data
            if (!handler.worldContent.LoadWorldData(worldId))
            {
                if (finalTest == false)
                {
                    _ = SceneTransition.DownloadWorld(worldId);
                }
                return;
            }

            // Prepare Next Scene
            SceneTransition.nextScene = new WorldScene();
        }