mirror of
https://github.com/lisk77/comet.git
synced 2025-12-12 09:08:49 +00:00
fix(examples): changed function calls from the new Renderer2D implementation
This commit is contained in:
parent
1f983fb2ad
commit
40d60771a3
8 changed files with 3 additions and 809 deletions
|
|
@ -2,7 +2,7 @@ use comet::prelude::*;
|
|||
|
||||
fn setup(app: &mut App, renderer: &mut Renderer2D) {
|
||||
// Initialize the texture atlas
|
||||
renderer.initialize_atlas();
|
||||
renderer.init_atlas();
|
||||
|
||||
// Register components
|
||||
app.register_component::<Position2D>();
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use winit_input_helper::WinitInputHelper;
|
|||
|
||||
fn setup(app: &mut App, renderer: &mut Renderer2D) {
|
||||
// Takes all the textures from res/textures and puts them into a texture atlas
|
||||
renderer.initialize_atlas();
|
||||
renderer.init_atlas();
|
||||
|
||||
let camera = app.new_entity();
|
||||
app.add_component(camera, Transform2D::new());
|
||||
|
|
@ -14,7 +14,7 @@ fn setup(app: &mut App, renderer: &mut Renderer2D) {
|
|||
|
||||
app.add_component(e1, Transform2D::new());
|
||||
|
||||
let mut renderer2d = Render2D::with_texture("res/textures/comet_icon.png");
|
||||
let renderer2d = Render2D::with_texture("res/textures/comet_icon.png");
|
||||
|
||||
app.add_component(e1, renderer2d);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue