var BattleLayer = cc.LayerColor.extend({ _battleList: [], //存储章节列表 ctor: function () { this._super(cc.color(220, 220, 220, 255)); this.initCard(); }, initCard: function () { for (var i = 1; i < 5; i++) { var posX = 100 + 100 * i; var pos = cc.p(posX, GC.h_2); //选关正面 var front = new cc.Sprite(res.ba_card_gates_png); front.setPosition(pos); front.setVisible(false); //设置正面隐藏 this.addChild(front, 0, -i); //章节介绍 var back = new cc.Sprite('res/battle/card_' + i + '.png'); back.setPosition(pos); this.addChild(back, 0, i); var listener = cc.EventListener.create({ event: cc.EventListener.TOUCH_ONE_BY_ONE,……

Continue reading