Beispiel #1
0
 static public bool isCollision(DymicBox3D p1, DymicBox3D p2)
 {
     return(!(p2.Top <= p1.Bottom || p2.Bottom >= p1.Top || p2.Left >= p1.Right || p2.Right <= p1.Left || p2.MaxH <= p1.MinH || p2.MinH >= p1.MaxH));
 }
Beispiel #2
0
 //用其他的碰撞盒复制+偏移 x,y坐标偏移z高度偏移
 public DymicBox3D(DymicBox3D copy, Vector3 offset) : this(copy.centerX + offset.x, copy.centerY + offset.y, copy.width, copy.height, copy.MaxH + offset.z)
 {
 }