Initial work on attack scripting system
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
pub mod int;
|
||||
pub mod segment;
|
||||
pub mod vec;
|
||||
pub mod vec3;
|
||||
|
||||
@@ -239,6 +239,15 @@ impl MulAssign<FGi32> for FGVec2 {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<(FGi32, FGi32)> for FGVec2 {
|
||||
fn from(value: (FGi32, FGi32)) -> Self {
|
||||
Self {
|
||||
x: value.0,
|
||||
y: value.1,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod is_normalized_tests {
|
||||
use super::*;
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
use bevy::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::math::int::FGi32;
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Default, Debug, Reflect, Serialize, Deserialize, Hash)]
|
||||
#[reflect(opaque)]
|
||||
pub struct FGVec3 {
|
||||
pub x: FGi32,
|
||||
pub y: FGi32,
|
||||
pub z: FGi32,
|
||||
}
|
||||
|
||||
impl FGVec3 {
|
||||
pub fn lit(x: &str, y: &str, z: &str) -> Self {
|
||||
Self {
|
||||
x: FGi32::lit(x),
|
||||
y: FGi32::lit(y),
|
||||
z: FGi32::lit(z),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user