Skip to content

Instantly share code, notes, and snippets.

@flushpot1125
Created July 17, 2022 16:00
Show Gist options
  • Save flushpot1125/6252a443725b6fc96a01518e124896cb to your computer and use it in GitHub Desktop.
Save flushpot1125/6252a443725b6fc96a01518e124896cb to your computer and use it in GitHub Desktop.
//move.ts
import Test from "./test";
private _test:Test;
public onStart(): void {
console.log(this._test._testNumber);
this._test.showLog();
}
//
//test.ts
export default class Test extends Node {
public _testNumber:number;
public onInitialize(): void {
this._testNumber=3;
// ...
}
public showLog:void(){
console.log("showing log");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment