Initial work on attack scripting system

This commit is contained in:
2026-08-29 20:38:49 +02:00
parent 9546df578d
commit 631096a262
10 changed files with 393 additions and 0 deletions
+1
View File
@@ -1,3 +1,4 @@
pub mod int;
pub mod segment;
pub mod vec;
pub mod vec3;
+9
View File
@@ -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::*;
+22
View File
@@ -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),
}
}
}