Sample 里边 Input 函数的问题

  • 本帖最后由 樊少强 于 2012-10-24 19:11 编辑 *

在现有的引擎代码Input例子里边,代码里边针对单点触摸的例子写的注册函数是

<div class="blockcode"><blockquote>                                 //-----Single point touch-------
                                 com.TouchMoved = function(){
                                     self.touchMoved();
                                 }
                                 com.TouchPressed = function(){
                                     self.touchPressed();
                                 }
                                 com.TouchReleased = function(){
                                     self.touchReleased();
                                 }
                                 com.TouchCancelled = function(){
                                     self.touchMoved();
                                 }

但在实际调用的时候 我们是调用 有参数的函数 ,会导致程序崩溃

                          //-----Single point touch-------
                          touchMoved:function(x, y){
//                              this.curPos.x = x;
//                              this.curPos.y = y;
//                              this.sprite.setPosition(this.curPos);
                          },
                          touchPressed:function(x, y){
                  
                          },
                          touchReleased:function(x, y){
                  
                          },
                          touchMoved:function(x, y){
                          
                          },

版本还是给引擎部门提下建议,别误导了大家,谢谢!

顶一个。

新版本已经修正了,下载新版本替换。{:3_48:}

顶一个。