Пример #1
0
        public void Update()
        {
            ld.Reset();

            var cfg = RayMarchingConfig.ActiveConfig;

            _rayMarchSmoothness.Portion(ld, smoothness.Value);
            _RayMarchLightColor.Portion(ld, _lightColor);
            _rayMarchShadowSoftness.Portion(ld, shadowSoftness.Value);
            _RayMarchFogColor.Portion(ld, _fogColor);
            _RayMarchReflectionColor.Portion(ld, _reflectionColor);

            _rayMarchSmoothness.Lerp(ld);
            _RayMarchLightColor.Lerp(ld);
            _rayMarchShadowSoftness.Lerp(ld);
            _RayMarchFogColor.Lerp(ld);
            _RayMarchReflectionColor.Lerp(ld);
        }
Пример #2
0
    private void Update()
    {
        LerpData lr = new LerpData();

        color0.Portion(lr, GetPreviewColor(1)); // = );
        //color1.Portion(lr, GetColor(1));
        color2.Portion(lr, GetPreviewColor(2));
        outline.Portion(lr, GetPreviewColor(0));

        color0.Lerp(lr);
        //color1.Lerp(lr);
        color2.Lerp(lr);
        outline.Lerp(lr);


        shotsDelay -= Time.deltaTime;

        if ((shotsToDo > 0) && (shotsDelay < 0))
        {
            audioSource.PlayOneShot(scoreSound);
            shotsDelay = 0.02f;
            shotsToDo--;
        }


        if (placing)
        {
            TryPlace();
        }

#if !UNITY_ANDROID
        updatePointedSector();
#endif



        for (int i = currentPlacingBlock; i < blocksToPlace; i++)
        {
            BlockScript b     = givenBlocks[i];
            float       scale = b.transform.localScale.x;
            scale = Mathf.Lerp(scale, (i == currentPlacingBlock) ? 1 : 0.5f, Time.deltaTime * 10);
            b.transform.localScale = Vector3.one * scale;
        }
    }