

export class CfgManager{
    private static instance: CfgManager;
    public static get Instance(): CfgManager {
        return this.instance || (this.instance = new CfgManager());
    }
 

     public train_cfg:any;
     public GetTrain(id:number){
         if(this.train_cfg){
             for (let index = 0; index < this.train_cfg.length; index++) {
                 const element = this.train_cfg[index];
                 if(element.id==id){
                     return element;
                 }
             }
         }
     }

     public sign_cfg:any;
     public GetSign(id:number){
         if(this.sign_cfg){
             for (let index = 0; index < this.sign_cfg.length; index++) {
                 const element = this.sign_cfg[index];
                 if(element.id==id){
                     return element;
                 }
             }
         }
     }

     public rewards_cfg:any;
     public GetReward(id:number){
         if(this.rewards_cfg){
             for (let index = 0; index < this.rewards_cfg.length; index++) {
                 const element = this.rewards_cfg[index];
                 if(element.id==id){
                     return element;
                 }
             }
         }
     }
}