Egret成语大挑战-关卡数据管理逻辑(七)
class LevelDataItem{
public answer:string;
public img:string;
public word:string;
public tip:string;
public content:string;
}
class LevelDataManager {
public static shared: LevelDataManager;
public static getInstance() {
if (!LevelDataManager.shared) {
LevelDataManager.shared = new LevelDataManager();
}
return LevelDataManager.shared
}
private items: LevelDataItem[] = [];
public totalLevels:number;
public constructor() {
this.items = RES.getRes('questions_json');
//获取关卡总长度
this.totalLevels = this.items.length;
}
//获取json具体关卡下标
public getLevelData(level:number):LevelDataItem{
return this.items[level]
}
//本地存储关卡逻辑
public get Milestone(){
let milestone = egret.localStorage.getItem('guessword');
if(milestone == null || milestone == ''){
return 1;
}else{
return parseInt(milestone);
}
}
//读取当前关卡数据
public set Milestone(level:number){
console.log('set milestone'+level)
egret.localStorage.setItem('guessword',level.toString())
}
}
Minor 1 posaconazole will increase the level or effect of docetaxel by affecting hepatic intestinal enzyme CYP3A4 metabolism reddit where buy priligy Faculty of Health Sciences, University of Cape Town, and the Hatter Institute of Cardiovascular Research in Africa K
Priligy diclofenac increases and terbutaline decreases serum potassium
priligy He states that he does not experience dysuria