mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交
This commit is contained in:
@@ -12,7 +12,7 @@ export default class GDetection{
|
||||
rect.x -= rect.width / 2;
|
||||
rect.y -= rect.height / 2;
|
||||
//@ts-ignore
|
||||
return PhysicsSystem2D.instance.testAABB(rect).map(item => item.getComponent(GRoleBase<any>));
|
||||
return PhysicsSystem2D.instance.testAABB(rect).map(item => item.getComponent(GRoleBase<any>)).filter(role => !!role);
|
||||
}
|
||||
//检测角色
|
||||
static testPointRole(pos:Vec2){
|
||||
|
Reference in New Issue
Block a user