<legend id='XC0f9'><style id='XC0f9'><dir id='XC0f9'><q id='XC0f9'></q></dir></style></legend>

  • <small id='XC0f9'></small><noframes id='XC0f9'>

      <i id='XC0f9'><tr id='XC0f9'><dt id='XC0f9'><q id='XC0f9'><span id='XC0f9'><b id='XC0f9'><form id='XC0f9'><ins id='XC0f9'></ins><ul id='XC0f9'></ul><sub id='XC0f9'></sub></form><legend id='XC0f9'></legend><bdo id='XC0f9'><pre id='XC0f9'><center id='XC0f9'></center></pre></bdo></b><th id='XC0f9'></th></span></q></dt></tr></i><div id='XC0f9'><tfoot id='XC0f9'></tfoot><dl id='XC0f9'><fieldset id='XC0f9'></fieldset></dl></div>
      1. <tfoot id='XC0f9'></tfoot>

        • <bdo id='XC0f9'></bdo><ul id='XC0f9'></ul>

        使用 CCTouchDispatcher Cocos2d 2.0 Beta-2 ARC

        时间:2024-08-12
            <tbody id='iUp4w'></tbody>
        • <small id='iUp4w'></small><noframes id='iUp4w'>

          • <bdo id='iUp4w'></bdo><ul id='iUp4w'></ul>
            <i id='iUp4w'><tr id='iUp4w'><dt id='iUp4w'><q id='iUp4w'><span id='iUp4w'><b id='iUp4w'><form id='iUp4w'><ins id='iUp4w'></ins><ul id='iUp4w'></ul><sub id='iUp4w'></sub></form><legend id='iUp4w'></legend><bdo id='iUp4w'><pre id='iUp4w'><center id='iUp4w'></center></pre></bdo></b><th id='iUp4w'></th></span></q></dt></tr></i><div id='iUp4w'><tfoot id='iUp4w'></tfoot><dl id='iUp4w'><fieldset id='iUp4w'></fieldset></dl></div>
            <legend id='iUp4w'><style id='iUp4w'><dir id='iUp4w'><q id='iUp4w'></q></dir></style></legend>

            <tfoot id='iUp4w'></tfoot>

                  本文介绍了使用 CCTouchDispatcher Cocos2d 2.0 Beta-2 ARC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在用 cocos2d 2.0 BETA 2.0 [最新的] 创建一个游戏.我需要在其他班级添加一个操纵杆.所以我在第二堂课中称它为CCTouchDispatcher".但我不能这样打电话:

                  I am creating a game with cocos2d 2.0 BETA 2.0 [The newest one]. And i need to add a joystick in other class. so I call this "CCTouchDispatcher" in my second class. But I can't call like this:

                  [[CCTouchDispatcher sharedDispatcher] addTargetedDelegate:self priority:0 swallowsTouches:YES];
                  

                  所以我做了这个:

                  _tocuhDispatcher = [[CCTouchDispatcher alloc] init];
                  [_tocuhDispatcher addTargetedDelegate:self priority:0 swallowsTouches:YES];
                  

                  但仍然无法检测到触摸.如果我在 HelloWorldLayer 中启用触摸,我可以通过触摸移动我的对象,但操纵杆不起作用

                  But still can't detect the touches. If I enable the touches in my HelloWorldLayer I could move my object with the touches but no the joystick doesn't work

                  我能做什么?

                  推荐答案

                  CCDirector *director = [CCDirector sharedDirector];
                  [[director touchDispatcher] addTargetedDelegate:self priority:0 swallowsTouches:YES]; 
                  

                  这篇关于使用 CCTouchDispatcher Cocos2d 2.0 Beta-2 ARC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Cocos2D 重力? 下一篇:在 cocos2d 中添加 UIViewController

                  相关文章

                  <i id='70ogJ'><tr id='70ogJ'><dt id='70ogJ'><q id='70ogJ'><span id='70ogJ'><b id='70ogJ'><form id='70ogJ'><ins id='70ogJ'></ins><ul id='70ogJ'></ul><sub id='70ogJ'></sub></form><legend id='70ogJ'></legend><bdo id='70ogJ'><pre id='70ogJ'><center id='70ogJ'></center></pre></bdo></b><th id='70ogJ'></th></span></q></dt></tr></i><div id='70ogJ'><tfoot id='70ogJ'></tfoot><dl id='70ogJ'><fieldset id='70ogJ'></fieldset></dl></div>
                1. <legend id='70ogJ'><style id='70ogJ'><dir id='70ogJ'><q id='70ogJ'></q></dir></style></legend>

                    <small id='70ogJ'></small><noframes id='70ogJ'>

                        <bdo id='70ogJ'></bdo><ul id='70ogJ'></ul>
                    1. <tfoot id='70ogJ'></tfoot>