im wondering if i should make each shield an object. so it can have its on x and y coordinate.
as you can see my foreshield is the first shield arc being checked in collision. ive just now realised that as I turn the ship, no matter where I specify to check for the other shield arcs, the enemy torpedo is always impacting at where I am checking for the front shield arc.
I believed(am I wrong) the way I am doing my code, is if a torpedo was hitting the right shield, it would check for the right shield arc graphics x and y position. because the functions if imagescollide, is checking specific images and their coordinates... so if a torpedo goes to collide with a different image, it should't have to worry about the coordinates it was checking for the fore shield arc, because you've turned that arc out of the way of the torpedo, and it should now be striking the arc that is facing.
this is why i feel turning each arc into an instanced object would solve the problem, because it'll be checking each image, with its own set of coordinates and not checking each shield image at the one set of coordinates being ship.x and ship.y
as you can see my foreshield is the first shield arc being checked in collision. ive just now realised that as I turn the ship, no matter where I specify to check for the other shield arcs, the enemy torpedo is always impacting at where I am checking for the front shield arc.
I believed(am I wrong) the way I am doing my code, is if a torpedo was hitting the right shield, it would check for the right shield arc graphics x and y position. because the functions if imagescollide, is checking specific images and their coordinates... so if a torpedo goes to collide with a different image, it should't have to worry about the coordinates it was checking for the fore shield arc, because you've turned that arc out of the way of the torpedo, and it should now be striking the arc that is facing.
this is why i feel turning each arc into an instanced object would solve the problem, because it'll be checking each image, with its own set of coordinates and not checking each shield image at the one set of coordinates being ship.x and ship.y