Beispiel #1
0
        public static void sys_map_sun(StudioController game, int param)
        {
            // set sunLightType, param = sunLightType index, CharaStudio only
            var st  = new SunLightInfo.Info.Type[] { SunLightInfo.Info.Type.DayTime, SunLightInfo.Info.Type.Evening, SunLightInfo.Info.Type.Night };
            var map = Map.Instance;

            map.sunType = st[param];
        }
            private static bool Map_sunType(Map __instance, SunLightInfo.Info.Type value)
            {
                if (IsStudio)
                {
                    return(true);
                }

                Singleton <Studio.Studio> .Instance.sceneInfo.sunLightType = (int)value;
                if (__instance.sunLightInfo != null)
                {
                    __instance.sunLightInfo.Set(value, Singleton <Studio.Studio> .Instance.cameraCtrl.mainCmaera);
                }
                //Added null check
                if (Singleton <Studio.Studio> .Instance.systemButtonCtrl != null)
                {
                    Singleton <Studio.Studio> .Instance.systemButtonCtrl.MapDependent();
                }

                return(false);
            }