init
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
cc.Class({
|
||||
extends: cc.Component,
|
||||
properties: {},
|
||||
onLoad: function () {
|
||||
this.levelDate = cc.global.levelDate;
|
||||
this.levellist = cc.global.levellist;
|
||||
this.levelid = cc.global.level;
|
||||
this.game = cc.global.gameModel;
|
||||
},
|
||||
start: function () {
|
||||
console.log("到这");
|
||||
this.creatorWin();
|
||||
},
|
||||
creatorWin: function () {
|
||||
var e = this;
|
||||
cc.loader.loadRes("prefab/ui/Hall_victory", function (o, t) {
|
||||
if (!o && t instanceof cc.Prefab) {
|
||||
var i = cc.instantiate(t);
|
||||
i.parent = e.node;
|
||||
i.getComponent("ui_victory").initdata(e.levelDate, e.levellist, e.levelid, e.game);
|
||||
i.zIndex = 999;
|
||||
i.position = cc.v2(0, 0);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user