updated 修改游戏碰撞事件
This commit is contained in:
5
game.js
5
game.js
@@ -242,10 +242,9 @@ function Game(id,options){
|
||||
return item;
|
||||
};
|
||||
//获取对象列表
|
||||
Stage.prototype.getItemsByType = function(){
|
||||
var types = Array.prototype.slice.call(arguments,0);
|
||||
Stage.prototype.getItemsByType = function(type){
|
||||
var items = this.items.filter(function(item){
|
||||
if(types.indexOf(item.type)>-1){
|
||||
if(item.type==type){
|
||||
return item;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user