示例#1
0
        void Start()
        {
            SunlightManager sunlightManager = GameManager.Instance.SunlightManager;

            sunlightManager.LightCurve = myLightCurve;
            Debug.Log("Changed Light Curve");
        }
        public static void Init(InitParams initParams)
        {
            mod = initParams.Mod;
            Debug.Log("Started setup of : " + mod.Title);
            new GameObject("DFULightCurveLoader").AddComponent <DFULightCurveLoader>(); // Add script to the scene.
            AnimationCurve curve = new AnimationCurve(
                new Keyframe(0.0f, 0.0f),
                new Keyframe(0.075f, 0.25f),
                new Keyframe(0.5f, 0.4f),
                new Keyframe(0.915f, 0.25f),
                new Keyframe(1.0f, 0.0f)
                );

            curve.postWrapMode = WrapMode.ClampForever;
            curve.preWrapMode  = WrapMode.ClampForever;
            SunlightManager sunlightManager = GameManager.Instance.SunlightManager;

            sunlightManager.LightCurve = curve;
            Debug.Log("Changed Light Curve");

            mod.IsReady = true;
        }