public void MouseInput() { if (Mouse.GetState().LeftButton == ButtonState.Pressed && !pressedLeft && mainNode.rect.Contains(Mouse.GetState().Position)) { pressedLeft = true; BoundingVolume bv = new BoundingVolume(Mouse.GetState().Position, new Point(Game1.r.Next(-3, 3), Game1.r.Next(-3, 3)), mainNode); Adicionar(bv); Node.selected = null; } if (Mouse.GetState().LeftButton == ButtonState.Released) { pressedLeft = false; } if (Mouse.GetState().RightButton == ButtonState.Pressed && !pressedRight && mainNode.rect.Contains(Mouse.GetState().Position)) { pressedRight = true; checkBV = new BoundingVolume(Mouse.GetState().Position, Point.Zero, null); Consultar(checkBV); } if (Mouse.GetState().RightButton == ButtonState.Released) { pressedRight = false; } }
public void ClearCheck() { checkBV = null; Node.selected = null; }
public void Consultar(BoundingVolume bv) { mainNode.CheckChildren(bv); }
public void Adicionar(BoundingVolume bv) { bvList.Add(bv); }