Switch to lightmap texture based lighting

This commit is contained in:
crumblingstatue 2023-04-07 22:16:57 +02:00
parent 907a5da105
commit f9a99fc0ae
6 changed files with 56 additions and 128 deletions

View file

@ -10,6 +10,7 @@ pub struct Input {
pub lmb_down: bool,
pub rmb_down: bool,
pub mouse_down_loc: ScreenPos,
pub mid_pressed: bool,
}
impl Input {
@ -33,6 +34,9 @@ impl Input {
if button == mouse::Button::Right {
self.rmb_down = true;
}
if button == mouse::Button::Middle {
self.mid_pressed = true;
}
}
&Event::MouseButtonReleased { button, .. } => {
if button == mouse::Button::Left {
@ -51,6 +55,7 @@ impl Input {
}
/// Pressed event should be cleared every frame
pub fn clear_pressed(&mut self) {
self.mid_pressed = false;
self.pressed.clear();
}
pub fn down(&self, key: Key) -> bool {