我使用此命令进行引力,并且它们与Flash Player 26的相机配合使用,但是“ hitTestPoint”在“ air 26 for Android”中无法正常工作。相机移动时,hitTestPoint发生故障并导致角色掉落。
grav = 0;
gravity = 2;
this.character.y += grav;
grav += gravity;
while (this.ground.hitTestPoint(this.character.x, this.character.y, true)) { this.character.y -=gravity;
grav = 0;
}
}