예제 #1
0
        public NavBallTexture()
        {
            _stockTexture   = new NavBallTextureChanger.Extensions.Lazy <Texture2D>(GetStockTexture);
            _flightMaterial = new NavBallTextureChanger.Extensions.Lazy <Material>(GetFlightNavBallMaterial);

            Instance = this;
        }
        internal static NavBallTexture _navballTexture;          //= new NavBallTexture(GetSkinDirectory());

        private void Awake()
        {
            _navballTexture = new NavBallTexture();

            // Save the original textures first
            _navballTexture.SaveCopyOfStockTexture(true);

            // Then load the config
            _navballTexture.LoadConfig();

            GameEvents.onVesselChange.Add(OnVesselChanged);
            GameEvents.OnCameraChange.Add(OnCameraChanged);
            GameEvents.onGameSceneSwitchRequested.Add(OnGameSceneSwitchRequested);

            //UpdateFlightTexture(); // Now done in LoadConfig()
        }