开发者

How do I solve this?

开发者 https://www.devze.com 2023-02-24 14:47 出处:网络
This is my code: http://pastie.org/1795351 I want this code to be able to remove af or bf if its touching ground. But I can\'t do that because \"cant define property of bf\" and af.

This is my code: http://pastie.org/1795351

I want this code to be able to remove af or bf if its touching ground. But I can't do that because "cant define property of bf" and af.

And I need to have it outside the other functions because I will have alot of code otherwise.

if(bf || af.hitTestObject(Baske开发者_如何转开发t)){
removeChild(bf || af);
}


function checkGroundHit(object Sprite):void
{
    if (ground.hitTest(object))
    {
         object.parent.removeChild(object);
    }
}

checkBasketHit(af);
checkBasketHit(bf);

I see no ground in your code to test against, maybe you missed it?

0

精彩评论

暂无评论...
验证码 换一张
取 消