Skip to content

Commit

Permalink
docs: repair doc links to bevy in app module (#154)
Browse files Browse the repository at this point in the history
* docs: repair external module links in ldtk_entity module

* docs: repair external crate links in LdtkIntCell module
  • Loading branch information
Trouv authored Jan 19, 2023
1 parent 26cae15 commit 0f928e8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
10 changes: 7 additions & 3 deletions src/app/ldtk_entity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ use std::{collections::HashMap, marker::PhantomData};
#[allow(unused_imports)]
use crate::app::register_ldtk_objects::RegisterLdtkObjects;

/// [Bundle]: bevy::prelude::Bundle
/// [App]: bevy::prelude::App
/// [Component]: bevy::prelude::Component
///
/// Provides a constructor which can be used for spawning entities from an LDtk file.
///
/// After implementing this trait on a [Bundle], you can register it to spawn automatically for a
Expand Down Expand Up @@ -282,14 +286,14 @@ use crate::app::register_ldtk_objects::RegisterLdtkObjects;
pub trait LdtkEntity {
/// The constructor used by the plugin when spawning entities from an LDtk file.
/// Has access to resources/assets most commonly used for spawning 2d objects.
/// If you need access to more of the [World], you can create a system that queries for
/// If you need access to more of the [World](bevy::prelude::World), you can create a system that queries for
/// `Added<EntityInstance>`, and flesh out the entity from there, instead of implementing this
/// trait.
/// This is because the plugin spawns an entity with an [EntityInstance] component if it's not
/// registered to the app.
///
/// Note: whether or not the entity is registered to the app, the plugin will insert [Transform],
/// [GlobalTransform], [Name], and [Parent] components to the entity **after** this bundle is
/// Note: whether or not the entity is registered to the app, the plugin will insert a
/// [SpatialBundle](bevy::prelude::SpatialBundle) to the entity **after** this bundle is
/// inserted.
/// So, any custom implementations of these components within this trait will be overwritten.
fn bundle_entity(
Expand Down
14 changes: 8 additions & 6 deletions src/app/ldtk_int_cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ use crate::{
use bevy::{ecs::system::EntityCommands, prelude::*};
use std::{collections::HashMap, marker::PhantomData};

#[allow(unused_imports)]
use crate::app::register_ldtk_objects::RegisterLdtkObjects;

/// [Bundle]: bevy::prelude::Bundle
/// [App]: bevy::prelude::App
/// [Component]: bevy::prelude::Component
///
/// Provides a constructor which can be used for spawning additional components on IntGrid tiles.
///
/// After implementing this trait on a [Bundle], you can register it to spawn automatically for a
Expand Down Expand Up @@ -125,14 +126,15 @@ use crate::app::register_ldtk_objects::RegisterLdtkObjects;
/// ```
pub trait LdtkIntCell {
/// The constructor used by the plugin when spawning additional components on IntGrid tiles.
/// If you need access to more of the [World], you can create a system that queries for
/// If you need access to more of the [World](bevy::prelude::World), you can create a system that queries for
/// `Added<IntGridCell>`, and flesh out the entity from there, instead of implementing this
/// trait.
/// This is because the plugin spawns a tile with an [IntGridCell] component if the tile's
/// value is not registered to the app.
///
/// Note: whether or not the entity is registered to the app, the plugin will insert [Transform],
/// [GlobalTransform], and [Parent] components to the entity **after** this bundle is inserted.
/// Note: whether or not the entity is registered to the app, the plugin will insert a
/// [SpatialBundle](bevy::prelude::SpatialBundle) to the entity **after** this bundle is
/// inserted.
/// So, any custom implementations of these components within this trait will be overwritten.
/// Furthermore, a [bevy_ecs_tilemap::tiles::TileBundle] will be inserted **before** this bundle, so
/// be careful not to overwrite the components provided by that bundle.
Expand Down

0 comments on commit 0f928e8

Please sign in to comment.