mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
509d73b27d
* PR1: add explicit function return type (#15311) * PR4: add explicit function return type (#15314) * [ci skip][AUTO]: Automated code generating update: 8843bfe54cd3f8e6f84432948716c8d130ecb233 (#15314) (#15357) Co-authored-by: cocos-robot <cocos-robot@cocos.com> * add function return type * fix version checking * fix return type --------- Co-authored-by: Cocos Robot <48829427+cocos-robot@users.noreply.github.com> Co-authored-by: cocos-robot <cocos-robot@cocos.com>
26 lines
772 B
TypeScript
26 lines
772 B
TypeScript
import { ccclass, executeInEditMode, requireComponent } from '../../../core/data/decorators';
|
|
import { Component } from '../../../scene-graph';
|
|
import { PostProcess } from './post-process';
|
|
|
|
@ccclass('cc.PostProcessSetting')
|
|
@requireComponent(PostProcess)
|
|
@executeInEditMode
|
|
export class PostProcessSetting extends Component {
|
|
static _default: PostProcessSetting | undefined
|
|
static get default (): PostProcessSetting {
|
|
if (!this._default) {
|
|
this._default = new this();
|
|
}
|
|
return this._default;
|
|
}
|
|
|
|
onEnable (): void {
|
|
const pp = this.getComponent(PostProcess);
|
|
pp?.addSetting(this);
|
|
}
|
|
onDisable (): void {
|
|
const pp = this.getComponent(PostProcess);
|
|
pp?.removeSetting(this);
|
|
}
|
|
}
|