We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reported at https://forum.cocos.org/t/topic/160220
Test code:
import { _decorator } from "cc"; const { ccclass } = _decorator; @ccclass('absTest') export abstract class absTest<T> { constructor(value: T) { this.Update(value); } private _bbb: T; public get bbb(): T { return this._bbb; } public Update(val: T) { this._bbb = val; this.OnUpdate(); } protected abstract OnUpdate(): void; } import { _decorator } from "cc"; import { absTest } from "./absTest"; const { ccclass } = _decorator; @ccclass('test1') export class test1 extends absTest<string>{ protected OnUpdate(): void { this._aaa = "aaaaa"; } private _aaa; public log(){ //这里,应该输出 aaaaa,哈哈 console.log(this._aaa,this.bbb); } }
The text was updated successfully, but these errors were encountered:
dumganhar
No branches or pull requests
Reported at https://forum.cocos.org/t/topic/160220
Test code:
The text was updated successfully, but these errors were encountered: