Hey all, for my private project (not work related) I'm working with collisons with enemies. Since I got multiple enemies, and basicly the collisoncheck should stay the same. I wonder if its possible to take over an 'object' into an function.
For my gamestate timer I would like to use something like this:
Any help wud be appriciated!
For my gamestate timer I would like to use something like this:
Code:
-(void)gamePlay {
//...
[self collisonCheck:troll]; //troll wud be an synthesized UIImageView.
}
//-(void)collisonCheck:theObject:(id)object { //How wud I make the parameter theObject contain the 'actual object' in this cass troll
-(void)collisonCheck:(UIImageView *)theObject {
if(!theObject.hidden) {
//doing the collison check from player to 'theObject'
}
}
Any help wud be appriciated!
Last edited: