init
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user