pub struct BulletContext {
pub elapsed: f32,
pub delta_time: f32,
pub spawn_pos: Vec2,
pub offset: Vec2,
pub initial_angle: f32,
pub initial_radius: f32,
pub player_pos: Vec2,
pub props: Vec<Prop>,
}Expand description
Bullet context passed to danmaku callbacks, mirrors the WIT bullet-context record.
传递给弹幕回调的上下文,对应 WIT 中的 bullet-context 记录。
Fields§
§elapsed: f32§delta_time: f32§spawn_pos: Vec2§offset: Vec2§initial_angle: f32§initial_radius: f32§player_pos: Vec2§props: Vec<Prop>Trait Implementations§
Source§impl Clone for BulletContext
impl Clone for BulletContext
Source§fn clone(&self) -> BulletContext
fn clone(&self) -> BulletContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BulletContext
impl Debug for BulletContext
Source§impl Default for BulletContext
impl Default for BulletContext
Source§fn default() -> BulletContext
fn default() -> BulletContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BulletContext
impl RefUnwindSafe for BulletContext
impl Send for BulletContext
impl Sync for BulletContext
impl Unpin for BulletContext
impl UnsafeUnpin for BulletContext
impl UnwindSafe for BulletContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more