egret基础-引擎碰撞检测
新建一个HitTest类,继承 egret.DisplayObjectContainer
class HitTest extends egret.DisplayObjectContainer
{
public constructor()
{
super();
this.addEventListener(egret.Event.ADDED_TO_STAGE,this.onAddToStage,this);
}
private onAddToStage(event:egret.Event)
{
this.drawText();
var shp:egret.Shape = new egret.Shape();
shp.graphics.beginFill( 0xff0000 );
shp.graphics.drawRect( 0,0,100,100);
shp.graphics.endFill();
shp.width = 100;
shp.height = 100;
this.addChild( shp );
var isHit:boolean = shp.hitTestPoint( 100, 100 );
this.infoText.text = "isHit: " + isHit;
}
private infoText:egret.TextField;
private drawText()
{
this.infoText = new egret.TextField();
this.infoText.y = 200;
this.infoText.text = "isHit";
this.addChild( this.infoText );
}
}
调用方法在main.ts里面
var _myGrid:HitTest = new HitTest();
this.addChild( _myGrid );
medicamento priligy estudios clinicos This syndrome is occasionally referred to as functional ovarian hyperandrogenism or ovarian hyperthecosis
Macrolides, including clarithromycin and erythromycin, should be used with caution in people with a predisposition to QT interval prolongation priligy dapoxetine This theoretically allows the loop diuretic to penetrate into the cells in higher concentrations, causing more severe damage
priligy precio bromide vitaros prezzo Mr