protected override void applyTrembling(float offset) { txUIObject uiObj = mComponentOwner as txUIObject; txNGUITexture staticTexture = uiObj as txNGUITexture; if (staticTexture == null) { logError("window is not a texture window!"); return; } WindowShaderLumOffset lumOffset = staticTexture.getWindowShader <WindowShaderLumOffset>(); if (lumOffset == null) { logError("window has no WindowShaderLumOffset!"); return; } float lum = mStartLum + (mTargetLum - mStartLum) * offset; lumOffset.setLumOffset(lum); }
protected override void applyTrembling(float offset) { txUIObject uiObj = mComponentOwner as txUIObject; txNGUITexture staticTexture = uiObj as txNGUITexture; if (staticTexture == null) { logError("window is not a texture window! can not offset hsl!"); return; } WindowShaderHSLOffset hslOffset = staticTexture.getWindowShader <WindowShaderHSLOffset>(); if (hslOffset == null) { logError("window has no hsl offset shader! can not offset hsl!"); return; } Vector3 hsl = mStartHSL + (mTargetHSL - mStartHSL) * offset; hslOffset.setHSLOffset(hsl); }