Skip to content

Commit

Permalink
chore: Move assets to examples (#113)
Browse files Browse the repository at this point in the history
FIXES #84
  • Loading branch information
suspistew authored Jun 3, 2021
1 parent 07f7441 commit 37de703
Show file tree
Hide file tree
Showing 21 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<img src="assets/banner.png" alt="Scion" />
<img src="banner.png" alt="Scion" />

Scion is a 2D game library made in rust.

Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
4 changes: 2 additions & 2 deletions examples/mario/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl SimpleGameLayer for Mario {

fn add_level_data(world: &mut World) -> Vec<Vec<usize>> {
let file = read_file(Path::new(
&app_base_path().join("assets/mario/level.csv").get(),
&app_base_path().join("examples/mario/assets/level.csv").get(),
))
.unwrap_or(vec![]);
let csv = from_utf8(file.as_slice()).expect("no");
Expand Down Expand Up @@ -151,7 +151,7 @@ fn add_level_data(world: &mut World) -> Vec<Vec<usize>> {
fn add_background(world: &mut World) {
let background = (
Rectangle::new(2560., 640., None),
Material::Texture(app_base_path().join("assets/mario/level.png").get()),
Material::Texture(app_base_path().join("examples/mario/assets/level.png").get()),
Transform::new(Coordinates::new_with_layer(0., 0., 1), 1., 0.),
);
world.push(background);
Expand Down
File renamed without changes
2 changes: 1 addition & 1 deletion examples/taquin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ struct Layer;

impl SimpleGameLayer for Layer {
fn on_start(&mut self, world: &mut World, resource: &mut Resources) {
let p = app_base_path().join("assets/taquin.png").get();
let p = app_base_path().join("examples/taquin/assets/taquin.png").get();
for x in 0..4 {
for y in 0..4 {
if !(x == 3 && y == 3) {
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion examples/tetris/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ fn app_config() -> ScionConfig {
}

pub fn asset_path() -> PathBuilder {
app_base_path().join("assets/tetris")
app_base_path().join("examples/tetris/assets/")
}

0 comments on commit 37de703

Please # to comment.