import { ZooMgr } from "./zooMgr";

const {ccclass, property, executeInEditMode, playOnFocus} = cc._decorator;

@ccclass
export class ZooId extends cc.Component{
    static _baseId = 0;

    id = 0;
    
    protected onLoad(): void {        
        this.id = ZooId._baseId++;
        ZooMgr.inst.add(this);
    }

    protected onDestroy(): void {
        ZooMgr.inst.remove(this);
    }
}