예제 #1
0
        public MinRendererSetSystem(Contexts contexts)
        {
            GameObject            gameController = GameObject.Find("GameController");
            MinRendererSetSampler sampler        = gameController.AddComponent <MinRendererSetSampler>();

            sampler.playerContext = contexts.player;
        }
        private static void ToggleTerrains(MenuCommand command)
        {
            if (command == null || command.context == null)
            {
                Debug.LogError("command or command.context is null");
                return;
            }

            MinRendererSetSampler sampler = command.context as MinRendererSetSampler;

            if (sampler == null)
            {
                Debug.LogError("sampler is null");
                return;
            }

            sampler.ToggleTerrainsAndTreeDetails();
        }
        private static void ViewRenders(MenuCommand command)
        {
            if (command == null || command.context == null)
            {
                Debug.LogError("command or command.context is null");
                return;
            }

            MinRendererSetSampler sampler = command.context as MinRendererSetSampler;

            if (sampler == null)
            {
                Debug.LogError("sampler is null");
                return;
            }

            sampler.ViewRenders();
        }