返回菜单问题

时间:2015-07-13 18:29:45

标签: lua corona physics

我对我的代码提出了一些问题, 当我停止物理引擎如何重新启动它?

1 个答案:

答案 0 :(得分:0)

https://docs.coronalabs.com/guide/physics/physicsSetup/index.html

开始/暂停/停止

以下功能启动,暂停和停止物理模拟:

.directive('myDir', function($http) {
  return {
    scope:{
      val: '=',//variable from parent scope for handling input value, if result of input not used outside directive can be removed
      template: '=' // template url for repeated div
    },
    template: '<input ng-model="val" ng-change="search()" />'+
              '<div ng-repeat="item in founded" ng-include="template"></div>',
    link: function link(scope, iElement, iAttrs, controller, transcludeFn) {
      scope.search = function(){// create change handler
        //use value `data-service` attribute as service name
        $http.get(iAttrs.service).success(function(data){
          scope.founded = data;
        });
      }    
    }

  }
}

这是你在找什么?