mirror of
https://github.com/lisk77/comet.git
synced 2025-12-12 17:18:50 +00:00
refactor(renderer): texture look up does not need a String as key anymore
This commit is contained in:
parent
4ed42b3de0
commit
8aec280447
2 changed files with 8 additions and 8 deletions
|
|
@ -131,7 +131,7 @@ pub trait Collider {
|
|||
pub trait Render {
|
||||
fn is_visible(&self) -> bool;
|
||||
fn set_visibility(&mut self, is_visible: bool);
|
||||
fn get_texture(&self) -> String;
|
||||
fn get_texture(&self) -> &str;
|
||||
fn set_texture(&mut self, texture: &'static str);
|
||||
}
|
||||
|
||||
|
|
@ -320,8 +320,8 @@ impl Render for Render2D {
|
|||
self.is_visible = is_visible;
|
||||
}
|
||||
|
||||
fn get_texture(&self) -> String {
|
||||
self.texture_name.parse().unwrap()
|
||||
fn get_texture(&self) -> &str {
|
||||
self.texture_name
|
||||
}
|
||||
|
||||
/// Use the actual file name of the texture instead of the path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue