23 lines
545 B
JavaScript
23 lines
545 B
JavaScript
cc.Class({
|
|
extends: cc.Component,
|
|
properties: {},
|
|
onLoad: function () {
|
|
this.game = cc.global.gameModel;
|
|
},
|
|
start: function () {
|
|
console.log("到这");
|
|
this.creatorWin();
|
|
},
|
|
creatorWin: function () {
|
|
var e = this;
|
|
cc.loader.loadRes("prefab/ui/ui_lost", function (o, t) {
|
|
if (!o && t instanceof cc.Prefab) {
|
|
var i = cc.instantiate(t);
|
|
i.parent = e.node;
|
|
i.getComponent("ui_victory").initdata(e.game);
|
|
i.zIndex = 999;
|
|
i.position = cc.v2(0, 0);
|
|
}
|
|
});
|
|
}
|
|
}); |