Skip to content
Permalink
3e1e64ee74
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
42 lines (31 sloc) 855 Bytes
package main;
import entity.EntityTypeA;
import entity.EntityTypeB;
import entity.EntityTypeC;
import entity.EntityTypeD;
public class GamePhysics {
public static boolean Collision(EntityTypeA enta, EntityTypeB bb){
if(enta.getBounds().intersects(bb.getBounds())){
return true;
}
return false;
}
public static boolean Collision(EntityTypeB entb, EntityTypeA aa){
if(entb.getBounds().intersects(aa.getBounds())){
return true;
}
return false;
}
public static boolean Collision(EntityTypeC entc, EntityTypeA aa){
if(entc.getBounds().intersects(aa.getBounds())){
return true;
}
return false;
}
public static boolean Collision(EntityTypeA entA, EntityTypeD dd){
if(entA.getBounds().intersects(dd.getBounds())){
return true;
}
return false;
}
}