virtual void update(float delta);
在ccp文件中
this->scheduleUpdate();
这样每一帧都会调用这个方法
取消调用update方法
this->unscheduleUpdate();
弧度与xy转化
float x = cos(n/180*3.14)*r; //n为弧度,r为半径 float y = sin(n/180*3.14)*r; //n为弧度,r为半径
virtual void update(float delta);
this->scheduleUpdate();
this->unscheduleUpdate();
float x = cos(n/180*3.14)*r; //n为弧度,r为半径 float y = sin(n/180*3.14)*r; //n为弧度,r为半径