Fix: typing ES5 bug
This commit is contained in:
@@ -1,40 +1,36 @@
|
||||
class TypingTextManager {
|
||||
function TypingTextManager() {
|
||||
this.init();
|
||||
}
|
||||
|
||||
constructor() {
|
||||
this.init();
|
||||
}
|
||||
TypingTextManager.prototype.init = function() {
|
||||
this.contents = [];
|
||||
}
|
||||
|
||||
init() {
|
||||
this.contents = [];
|
||||
}
|
||||
TypingTextManager.prototype.getContents = function() {
|
||||
return this.contents;
|
||||
}
|
||||
|
||||
getContents() {
|
||||
return this.contents;
|
||||
}
|
||||
TypingTextManager.prototype.add = function(arr) {
|
||||
this.contents = this.contents.concat(arr);
|
||||
}
|
||||
|
||||
add(arr) {
|
||||
this.contents = this.contents.concat(arr);
|
||||
}
|
||||
TypingTextManager.prototype.slice = function(start, end) {
|
||||
this.contents = this.contents.slice(start, end);
|
||||
}
|
||||
|
||||
slice(start, end) {
|
||||
this.contents = this.contents.slice(start, end);
|
||||
}
|
||||
TypingTextManager.prototype.getShuffledArray = function(arr) {
|
||||
return Phaser.ArrayUtils.shuffle(arr);
|
||||
}
|
||||
|
||||
getShuffledArray(arr) {
|
||||
return Phaser.ArrayUtils.shuffle(arr);
|
||||
}
|
||||
|
||||
|
||||
makePracticeContents(arr, repeatCount) {
|
||||
this.init();
|
||||
this.add(arr);
|
||||
for(let i = 0; i < repeatCount; i++) {
|
||||
this.add(this.getShuffledArray(arr));
|
||||
}
|
||||
}
|
||||
|
||||
makeTestContents(arr) {
|
||||
this.init();
|
||||
TypingTextManager.prototype.makePracticeContents = function(arr, repeatCount) {
|
||||
this.init();
|
||||
this.add(arr);
|
||||
for(var i = 0; i < repeatCount; i++) {
|
||||
this.add(this.getShuffledArray(arr));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
TypingTextManager.prototype.makeTestContents = function(arr) {
|
||||
this.init();
|
||||
this.add(this.getShuffledArray(arr));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user