object.hitTestObjectを使用するか、次のように境界を計算することで、パフォーマンスが向上することを意味します。
if(obj.x > obj2.x && obj.x < obj2.x + obj2.width &&
obj.y > obj2.y && obj.y < obj2.y + obj2.height)
{
trace('spaceship damaged!!!');
}
//or using
if(obj.hitTestObject(obj2))
{
trace('spaceship damaged by hitTestObject!!!');
}
実際には何をもっと使いますか?そして何がより効率的ですか?どのくらいのパーセントのパフォーマンスが自己計算を提供しますか?20%?40%?60%?