1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-12-12 03:19:49 +00:00
UltimateTrainingModpack/src/training/attack_angle.rs
Chris McDonald 5b2e4c7319
Add rustfmt CI checker and format (#518)
* Add rustfmt CI checker

Minimal checker that just runs `cargo fmt --check` on all targets.

* rustfmt
2023-04-11 14:56:14 -07:00

26 lines
543 B
Rust

use smash::app::{self};
use crate::common::consts::*;
use crate::common::*;
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,
}
}