Expand description
Load Flash animations into the Bevy game engine. This plugin supports loading Flash animations from SWF files and playing them in Bevy. It also provides a player component to control the animation playback.
§Example
use bevy::prelude::*;
use bevy_flash::FlashPlugin, Flash;
let mut app = App::new();
app.add_plugins((DefaultPlugins, FlashPlugin))
.add_systems(Startup, setup)
.run();
fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
let swf_handle = asset_server.load("path/to/animation.swf");
commands.spawn(Flash(swf_handle));
}Modules§
Structs§
- Flash
Complete Event - Flash 动画完成事件,非循环播放时触发
- Flash
Frame Event - Flash 动画帧事件
- Flash
Plugin - Flash 插件,为 Bevy 引入 Flash 动画。