common-game
Advanced tools
Comparing version 0.0.20 to 0.0.21
{ | ||
"name": "common-game", | ||
"version": "0.0.20", | ||
"version": "0.0.21", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "common-game.js", |
@@ -48,2 +48,15 @@ import * as PIXI from "@tbminiapp/pixi-miniprogram-engine"; | ||
} | ||
getLiveSprite() { | ||
let arr = []; | ||
let container = this.getContainer("block"); | ||
container.children.forEach(sprite => { | ||
if (sprite.visible && !sprite.dieStatus) { | ||
let bounds = sprite.getBounds(); | ||
if (0 <= bounds.x + bounds.width && bounds.x <= this.width && bounds.y <= this.height) { | ||
arr.push(sprite); | ||
} | ||
} | ||
}) | ||
return arr; | ||
} | ||
// 全局点击事件 | ||
@@ -50,0 +63,0 @@ bindFullEvent(callback) { |
44761
1277