bevy_mod_kira 0.2.0

A plugin that integrates the Kira audio library for use in the Bevy game engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use bevy::time::Timer;

pub(crate) struct TimerMs<const N: i32> {
    pub(crate) timer: Timer,
}

impl<const N: i32> Default for TimerMs<N> {
    fn default() -> Self {
        Self {
            timer: Timer::from_seconds(N as f32 / 1000.0, bevy::time::TimerMode::Repeating),
        }
    }
}