void OnDrawGizmos() { Gizmos.color = Color.green; Gizmos.DrawWireCube(startingBounds.center, startingBounds.size); List <Bullet> bullets = bullet_pool.GetBullets(); for (int i = 0; i < bullets.Count; i++) { if (bullets [i].Type == EType.ENEMY || bullets [i].Type == EType.NIGHTMARE || bullets [i].Type == EType.DREAM || bullets [i].Type == EType.SHOT) { Gizmos.color = Color.yellow; OBB OBB = bullets [i].OBB; Gizmos.DrawLine(OBB.FL, OBB.FR); Gizmos.DrawLine(OBB.FR, OBB.BR); Gizmos.DrawLine(OBB.BR, OBB.BL); Gizmos.DrawLine(OBB.BL, OBB.FL); if (bullets [i].AABB != Rect.zero) { Gizmos.color = Color.green; Gizmos.DrawWireCube(bullets [i].AABB.center, bullets [i].AABB.size); Gizmos.color = Color.red; if (bullets [i].Radius != 0) { Gizmos.DrawWireSphere(bullets [i].AABB.center, bullets [i].Radius); } } } } if (player.obj != null) { Gizmos.color = Color.red; Gizmos.DrawWireSphere(player.obj.Position, player.hitbox_radius); Gizmos.color = Color.blue; Gizmos.DrawWireSphere(player.obj.Position, player.grazebox_radius); } if (player.bomb.obj != null) { Gizmos.color = Color.yellow; float radius = player.bomb.obj.Radius; Gizmos.DrawWireSphere(player.bomb.obj.Position, radius); Gizmos.DrawWireCube(player.bomb.obj.AABB.center, player.bomb.obj.AABB.size); } }
void OnDrawGizmos() { Gizmos.color = Color.green; Gizmos.DrawWireCube(startingBounds.center, startingBounds.size); List <Bullet> bullets = bullet_pool.GetBullets(); for (int i = 0; i < bullets.Count; i++) { Gizmos.color = Color.green; Gizmos.DrawWireCube(bullets[i].AABB.center, bullets[i].AABB.size); Gizmos.color = Color.yellow; OBB OBB = bullets[i].OBB; Gizmos.DrawLine(OBB.FL, OBB.FR); Gizmos.DrawLine(OBB.FR, OBB.BR); Gizmos.DrawLine(OBB.BR, OBB.BL); Gizmos.DrawLine(OBB.BL, OBB.FL); } }