Skip to content

Commit

Permalink
remove duplicate tick function from pipeline mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
Indra-db committed Mar 5, 2024
1 parent b56a76c commit e6d5055
Showing 1 changed file with 11 additions and 24 deletions.
35 changes: 11 additions & 24 deletions flecs_ecs/src/core/world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,19 +185,25 @@ impl World {
///
/// * C++ API: `world::delta_time`
#[doc(alias = "world::delta_time")]
pub fn delta_time(&self) -> f32 {
pub fn get_delta_time(&self) -> f32 {
self.get_world_info().delta_time
}

/// Gets the current tick.
/// Get current tick.
///
/// Retrieves the total number of simulation ticks (frames) that have been
/// processed by the world. This can be used to track the simulation's
/// progress over time.
///
/// # Returns
///
/// Returns the total number of frames that have passed.
/// Monotonically increasing frame time. The total number of ticks as an integer.
///
/// # See also
///
/// * C++ API: `world::tick`
#[doc(alias = "world::tick")]
pub fn tick(&self) -> i64 {
pub fn get_tick(&self) -> i64 {
self.get_world_info().frame_count_total
}

Expand All @@ -209,7 +215,7 @@ impl World {
///
/// * C++ API: `world::time`
#[doc(alias = "world::time")]
pub fn time(&self) -> f32 {
pub fn get_time(&self) -> f32 {
self.get_world_info().world_time_total
}

Expand Down Expand Up @@ -3868,25 +3874,6 @@ impl World {
self.get_world_info().time_scale
}

/// Get current tick.
///
/// Retrieves the total number of simulation ticks (frames) that have been
/// processed by the world. This can be used to track the simulation's
/// progress over time.
///
/// # Returns
///
/// Monotonically increasing frame time. The total number of ticks as an integer.
///
/// # See also
///
/// * C++ API: `world::tick`
#[doc(alias = "world::tick")]
#[inline(always)]
pub fn get_tick(&self) -> i64 {
self.get_world_info().frame_count_total
}

/// Get target frames per second (FPS).
///
/// Retrieves the target FPS for the world. This value is used to calculate
Expand Down

0 comments on commit e6d5055

Please sign in to comment.