优化弹窗UI细节
This commit is contained in:
1 parent
eb48d8e845
commit
b2036cd9bc
30 files changed
+7385
-2859
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import { _decorator, Color, Component, Graphics, Node } from 'cc';
|
||||
import { drawCelebrationGraphics } from './DialogCelebration';
|
||||
const { ccclass } = _decorator;
|
||||
|
||||
/** Graphics的路径不序列化;仅重绘已有节点,不创建运行时UI。 / Redraw saved graphics nodes because drawing commands are not serialized. */
|
||||
@ccclass('DialogEffects')
|
||||
export class DialogEffects extends Component {
|
||||
onLoad(): void {
|
||||
const shade = this.node.getChildByName('Shade')?.getComponent(Graphics);
|
||||
if (shade) {
|
||||
shade.clear(); shade.fillColor = new Color(12, 0, 22, 155);
|
||||
shade.rect(-10000, -10000, 20000, 20000); shade.fill();
|
||||
}
|
||||
const parent = this.node.getChildByName('BonusAwardDialog');
|
||||
if (parent) drawCelebrationGraphics(parent);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user