cityui = cc.Layer.extend({
tableView: null,
ctor: function () {
//1. call super class's ctor function
this._super();
this.init();
},
init: function () {
this._super();
。。。。。。。。
var CityLayer = cc.Layer.extend({
_ctui:null,
coins:0,
ctor: function () {
//1. call super class's ctor function
this._super();
},
init: function () {
this._super();
var size = cc.winSize;
this._ctui = new cityui();
this.addChild(this._ctui);
。。。。
_onTouchBegan: function (touch, event)
{
if(this._ctui) 这里报错 显示 未定义,求解, undefined