You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
517 B
28 lines
517 B
4 years ago
|
function Back() {
|
||
|
this.lib = library;
|
||
|
|
||
|
this.back = null;
|
||
|
}
|
||
|
|
||
|
Back.of = function () {
|
||
|
const instance = new Back();
|
||
|
instance.init();
|
||
|
return instance;
|
||
|
};
|
||
|
|
||
|
Back.prototype.init = function () {
|
||
|
const target = new this.lib.btnBack();
|
||
|
target.x = 40;
|
||
|
target.y = 80;
|
||
|
target.scaleX = 1.3;
|
||
|
target.scaleY = 1.3;
|
||
|
target.addEventListener('click', this.goHome, false);
|
||
|
this.back = target;
|
||
|
stage.addChild(target);
|
||
|
};
|
||
|
|
||
|
// 返回主菜单 TODO:
|
||
|
Back.prototype.goHome = function () {
|
||
|
console.log('goHome');
|
||
|
};
|