Ejemplo n.º 1
0
        public void ChangeToPlatform(int index)
        {
            // Hide current Platform
            platforms.ElementAt(platformIndex).gameObject.SetActive(false);

            // Increment index
            platformIndex = index % platforms.Count;

            // Save path into PlayerPrefs
            PlayerPrefs.SetString("CustomPlatformPath", bundlePaths.ElementAt(platformIndex));

            CustomPlatform newPlaform = platforms.ElementAt(platformIndex);

            // Show new platform
            newPlaform.gameObject.SetActive(true);

            // Hide environment for new platform
            StartCoroutine(envHider.WaitForPlatformAndHideObjects(platforms.ElementAt(platformIndex)));

            // Update lightSwitchEvent TubeLight references
            TubeLightManager.UpdateEventTubeLightList();
        }