/**
-
游戏模型对象(用于标识当前游戏元素的类)
*/
export class ArrModel {
private url : string;
private mark : number;
private probabilitty : number;
private multiple : { [key : number] : number };constructor(url : string = '', mark : number = 0, probability : number = 0, multiple : { [key : number] : number } = {}) {
this.url = url;
this.mark = mark;
this.probabilitty = probability;
this.multiple = multiple;
}// 获取 URL
getUrl() {
return this.url;
}// 获取 mark
getMark() {
return this.mark;
}// 获取probability
getProbability() {
return this.probabilitty
}// 获取multiple
getMultiple() {
return this.multiple
}// 设置 URL
setUrl(url : string) {
this.url = url;
}// 设置 mark
setMark(mark : number) {
this.mark = mark;
}// 设置 probabilitty
setProbabilitty(probabilitty : number) {
this.probabilitty = probabilitty;
}// 设置multiple
setMultiple(multiple : { [key : number] : number }) {
this.multiple = multiple
}
}
我在运行的时候没问题,但是在打包的时候会告诉我{ [key : number] : number }是不支持的索引大佬们这个要怎么解决呢
0 个回复