Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hit assignment problem #13

Open
nerkn opened this issue Nov 24, 2011 · 0 comments
Open

hit assignment problem #13

nerkn opened this issue Nov 24, 2011 · 0 comments

Comments

@nerkn
Copy link

nerkn commented Nov 24, 2011

I defined 4 platform which our hero will run on,
this snipped wont work

for(var i=0;i<4;i++){
    sprite.hit(wall2[i], spriteColl)
}

but this works

for(var i=0;i<4;i++){
    wall2[i].hit(sprite, spriteColl)
}

spriteColl is collusion function.

spriteColl = function(){
        sprite.d*=-1  ;
    };

error is p2 undefined in mibbu.js line 260

258 for(element in MB_collides[loopIndex].hits){
259 p2 = MB_fixedIndexColl[element];
260 p2Top = p2.posY + p2.cZ.t;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant