mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-14 19:55:02 +01:00
Improve lighting a bit
This commit is contained in:
parent
c78123ccd8
commit
178babdec9
3 changed files with 3 additions and 3 deletions
BIN
res/light2.png
Normal file
BIN
res/light2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.4 KiB |
|
|
@ -98,8 +98,8 @@ impl GameState {
|
|||
ls.pos.y as i32 - self.camera_offset.y as i32,
|
||||
);
|
||||
let mut s = Sprite::with_texture(&res.light_texture);
|
||||
s.set_scale((3.0, 3.0));
|
||||
s.set_origin((32., 32.));
|
||||
s.set_scale((4., 4.));
|
||||
s.set_origin((128., 128.));
|
||||
s.set_position((x as f32, y as f32));
|
||||
lightmap.draw(&s);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ impl Res {
|
|||
pub fn load() -> anyhow::Result<Self> {
|
||||
Ok(Self {
|
||||
tile_atlas: Texture::from_file("res/tiles.png")?,
|
||||
light_texture: Texture::from_file("res/lightcircle.png")?,
|
||||
light_texture: Texture::from_file("res/light2.png")?,
|
||||
surf_music: Music::from_file("res/music.ogg").unwrap(),
|
||||
und_music: Music::from_file("res/cave2.ogg").unwrap(),
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue