
export default class GameData{
    private static _instance:GameData = null;
    private _mapData:Map<string, any> = new Map();
    static getInstance(){
        if(!this._instance){
            this._instance = new GameData();
        }
        return this._instance;
    }
    
    setData(key:string, data:any){
        if(!data || key.length <=0){
            return;
        }
        this._mapData.set(key, data);
    }

    getData(key:string){
        return this._mapData.get(key);
    }
}