12345678910111213141516171819202122232425262728293031 |
- const { ccclass, property } = cc._decorator;
- @ccclass
- export default class player extends cc.Component {
- private static _instance: player = null;
-
- public static getInstance(): any {
- if (this._instance == null) {
- this._instance = new player();
- }
- return this._instance;
- }
- onLoad() {
- player._instance = this;
- }
- start(){
-
- }
-
- update(dt: number) {
-
- }
- }
|