public int checkCollision(Element e) { int ans = base.checkCollision(e); if(ans != -1){ if ((type == 44) || (type == 128)) { setDrawable(false); } if ((type == 83)||(type==104)) { if(ans == 4){ if(type == 83){ type = 84; immutable = true; } setEnd(); } } } return ans; }
public int checkCollision(Element e) { int ans = ourBox.Intersect(e.getCollisionBox()); hasBeenHit = ans; return ans; }