Esempio n. 1
0
    protected override void applyTrembling(float offset)
    {
        txUIObject          uiObj         = mComponentOwner as txUIObject;
        txNGUIStaticTexture staticTexture = uiObj as txNGUIStaticTexture;

        if (staticTexture == null)
        {
            UnityUtility.logError("window is not a texture window!");
            return;
        }
        WindowShaderLumOffset lumOffset = staticTexture.getWindowShader <WindowShaderLumOffset>();

        if (lumOffset == null)
        {
            UnityUtility.logError("window has no WindowShaderLumOffset!");
            return;
        }
        float lum = mStartLum + (mTargetLum - mStartLum) * offset;

        lumOffset.setLumOffset(lum);
    }
Esempio n. 2
0
    protected override void applyTrembling(float offset)
    {
        txUIObject          uiObj         = mComponentOwner as txUIObject;
        txNGUIStaticTexture staticTexture = uiObj as txNGUIStaticTexture;

        if (staticTexture == null)
        {
            UnityUtility.logError("window is not a texture window! can not offset hsl!");
            return;
        }
        WindowShaderHSLOffset hslOffset = staticTexture.getWindowShader <WindowShaderHSLOffset>();

        if (hslOffset == null)
        {
            UnityUtility.logError("window has no hsl offset shader! can not offset hsl!");
            return;
        }
        Vector3 hsl = mStartHSL + (mTargetHSL - mStartHSL) * offset;

        hslOffset.setHSLOffset(hsl);
    }