From 9ba4d886b7d88a661c1a6ac8a5a580d3e4ff1b2a Mon Sep 17 00:00:00 2001 From: caizhitao Date: Thu, 26 Dec 2019 15:59:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8F=91=E5=85=89demo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/scripts/GlowInnerEffectScene.ts | 4 ++-- assets/scripts/GlowOutterEffectScene.ts | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/assets/scripts/GlowInnerEffectScene.ts b/assets/scripts/GlowInnerEffectScene.ts index 0fc480b..f4b2cdb 100644 --- a/assets/scripts/GlowInnerEffectScene.ts +++ b/assets/scripts/GlowInnerEffectScene.ts @@ -83,7 +83,7 @@ export default class GlowInnerEffectScene extends cc.Component { this._glowThresholdSliderLabel.string = `${realGlowThresholdProgress.toFixed(2)}`; // 更新材质 - this._updateRenderComponentOutterGlowMaterial({ + this._updateRenderComponentMaterial({ glowColor: cc.v4(this._redSlider.progress, this._greenSlider.progress, this._blueSlider.progress, this._alphaSlider.progress), glowColorSize: realGlowWidthProgress, glowThreshold: realGlowThresholdProgress @@ -97,7 +97,7 @@ export default class GlowInnerEffectScene extends cc.Component { * 2. 给材质的 unitform 变量赋值 * 3. 重新将材质赋值回去 */ - private _updateRenderComponentOutterGlowMaterial(param: { + private _updateRenderComponentMaterial(param: { /** * 发光宽度 [0.0, 1.0] */ diff --git a/assets/scripts/GlowOutterEffectScene.ts b/assets/scripts/GlowOutterEffectScene.ts index 42f4323..45a0872 100644 --- a/assets/scripts/GlowOutterEffectScene.ts +++ b/assets/scripts/GlowOutterEffectScene.ts @@ -26,7 +26,6 @@ export default class GlowOutterEffectScene extends cc.Component { // 关闭动态合图 cc.dynamicAtlasManager.enabled = false; - // cc.dynamicAtlasManager.showDebug(true); this._redSlider = cc.find("Canvas/Content/Sliders/ColorRedSlider/Slider").getComponent(cc.Slider); this._redSliderLabel = cc.find("Canvas/Content/Sliders/ColorRedSlider/ValueLabel").getComponent(cc.Label); @@ -87,7 +86,7 @@ export default class GlowOutterEffectScene extends cc.Component { this._glowThresholdSliderLabel.string = `${realGlowThresholdProgress.toFixed(2)}`; // 更新材质 - this._updateRenderComponentOutterGlowMaterial({ + this._updateRenderComponentMaterial({ glowColor: cc.v4(this._redSlider.progress, this._greenSlider.progress, this._blueSlider.progress, this._alphaSlider.progress), glowColorSize: realGlowWidthProgress, glowThreshold: realGlowThresholdProgress @@ -101,7 +100,7 @@ export default class GlowOutterEffectScene extends cc.Component { * 2. 给材质的 unitform 变量赋值 * 3. 重新将材质赋值回去 */ - private _updateRenderComponentOutterGlowMaterial(param: { + private _updateRenderComponentMaterial(param: { /** * 发光宽度 [0.0, 1.0] */