标签:blog os ar div 2014 on art log 代码
bool sign2 = true; bool sign2 = true; void GameLayer::onTouchMoved(Touch *touch, Event *unused){ if(sign){ sign = false; ** if(sign2){ CCLOG("RUNNING!"); sign2 = false; sign = true; }else{ sign2 = true; } ** } }
假设上述代码顺序执行,则会出现无限循环的RUNNING的LOG:
RUNNING!cocos2d-3.0 Helloworld::onTouchMoved的处理机制的推測
标签:blog os ar div 2014 on art log 代码
原文地址:http://www.cnblogs.com/lcchuguo/p/4043495.html