2个版本
| 0.1.1 | 2020年9月12日 | 
|---|---|
| 0.1.0 | 2020年9月4日 | 
#46 in #null
在 bakkesmod 中使用
3KB
BakkesMod插件Rust SDK
示例
use bakkesmod::prelude::*;
use bakkesmod::wrappers::unreal::*;
use bakkesmod::{game, console};
#[plugin_init]
pub fn on_load() {
    console::register_notifier("get_ball_location", Box::new(move |_: Vec<String>| {
        let game = match bakkesmod::get_game_event_as_server() {
            Some(g) => g,
            None => {
                log_console!("game is null!");
                return;
            }
        };
        
        match game.get_ball() {
            Some(ball) => log_console!("{}", ball.get_location()),
            None => log_console!("ball is NULL")
        };
    }));
}
在示例目录中查看更多示例。
依赖
~1.5MB
~35K SLoC