mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2024-12-02 22:59:38 +00:00
bc3d2d8df5
* Add rustfmt action * Update rust.yml * Format Rust code using rustfmt * Update consts.rs Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
25 lines
542 B
Rust
25 lines
542 B
Rust
use crate::common::consts::*;
|
|
use crate::common::*;
|
|
use smash::app::{self};
|
|
|
|
static mut DIRECTION: AttackAngle = AttackAngle::UP;
|
|
|
|
pub fn roll_direction() {
|
|
unsafe {
|
|
DIRECTION = MENU.attack_angle.get_random();
|
|
}
|
|
}
|
|
|
|
pub unsafe fn mod_get_stick_dir(
|
|
module_accessor: &mut app::BattleObjectModuleAccessor,
|
|
) -> Option<f32> {
|
|
if !is_operation_cpu(module_accessor) {
|
|
return None;
|
|
}
|
|
|
|
match DIRECTION {
|
|
AttackAngle::UP => Some(1.0),
|
|
AttackAngle::DOWN => Some(-1.0),
|
|
_ => None,
|
|
}
|
|
}
|