I am trying to program the game to stop automatically when the bird actors hits the penguin actor, but I don't know how to do it. Here is my current code for the bird.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | private boolean canHitPengu() { Pengu pengu = (Pengu) getOneObjectAtOffset( 0 , 0 , Pengu. class ); if (pengu != null ) { return true ; } else { return false ; } } private void hitPengu() { if (Hit) { return ; } Pengu pengu = (Pengu) getOneObjectAtOffset( 0 , 0 , Pengu. class ); } |