egret_碰撞检测

var shape = new egret.Shape();

shape.graphics.beginFill(0xff00ff,1);

shape.graphics.drawRect(100,100,200,200);

shape.graphics.endFill();

this.sceneManger.mainstage.addChild(shape);

var status = shape.hitTestPoint(120,120,true);

console.log(status);

你可能感兴趣的:(egret_碰撞检测)