Refactor some files to player directory

This commit is contained in:
Sofia 2026-07-24 00:47:02 +03:00
parent cda93ffaac
commit 600f5b4986
8 changed files with 12 additions and 11 deletions

View File

@ -15,9 +15,8 @@ use crate::{
}, },
util::NetVector3, util::NetVector3,
}, },
player::{DamageSource, IPlayer, LocalPlayer, NetTransform, RemotePlayer}, player::{DamageSource, IPlayer, LocalPlayer, NetTransform, RemotePlayer, weapon::WeaponType},
team_resource::TeamResource, team_resource::TeamResource,
weapon::WeaponType,
}; };
pub const GAME_MANAGER_GLOBAL: &str = "GameManagerGlobal"; pub const GAME_MANAGER_GLOBAL: &str = "GameManagerGlobal";

View File

@ -10,12 +10,9 @@ pub mod map;
pub mod map_resource; pub mod map_resource;
pub mod net; pub mod net;
pub mod player; pub mod player;
pub mod player_hand_remover;
pub mod popup_queue; pub mod popup_queue;
pub mod soldier_mesh;
pub mod team_resource; pub mod team_resource;
pub mod ui; pub mod ui;
pub mod weapon;
struct MyExtension; struct MyExtension;

View File

@ -12,10 +12,9 @@ use crate::{
game_manager::{Game, GameManager, GameOption, GameOptionValue, NetPlayer}, game_manager::{Game, GameManager, GameOption, GameOptionValue, NetPlayer},
game_settings::GameSettingsManager, game_settings::GameSettingsManager,
net::{net_stats::Stats, util::NetVector3}, net::{net_stats::Stats, util::NetVector3},
player::{DamageSource, NetTransform}, player::{DamageSource, NetTransform, weapon::WeaponType},
popup_queue::{Popup, PopupQueue}, popup_queue::{Popup, PopupQueue},
ui::cli::{CliColor, CommandLinePanel}, ui::cli::{CliColor, CommandLinePanel},
weapon::WeaponType,
}; };
#[derive(GodotClass)] #[derive(GodotClass)]

View File

@ -22,11 +22,17 @@ use crate::{
}, },
util::{NetVector3, cast_ray}, util::{NetVector3, cast_ray},
}, },
soldier_mesh::SoldierMesh, player::{
soldier_mesh::SoldierMesh,
weapon::{BallWeapon, Raygun, Weapon, WeaponType},
},
ui::{cli::CommandLinePanel, settings::SettingsPanel}, ui::{cli::CommandLinePanel, settings::SettingsPanel},
weapon::{BallWeapon, Raygun, Weapon, WeaponType},
}; };
pub mod player_hand_remover;
pub mod soldier_mesh;
pub mod weapon;
#[derive(Debug, Clone, Copy, Serialize, Deserialize)] #[derive(Debug, Clone, Copy, Serialize, Deserialize)]
pub struct NetTransform { pub struct NetTransform {
pub location: NetVector3, pub location: NetVector3,

View File

@ -3,7 +3,7 @@ use godot::{
prelude::*, prelude::*,
}; };
use crate::{ use crate::player::{
player_hand_remover::PlayerHandRemover, player_hand_remover::PlayerHandRemover,
weapon::{BallWeapon, Raygun, Weapon}, weapon::{BallWeapon, Raygun, Weapon},
}; };

View File

@ -1,6 +1,6 @@
use godot::prelude::*; use godot::prelude::*;
use crate::soldier_mesh::SoldierMesh; use crate::player::soldier_mesh::SoldierMesh;
#[derive(GodotClass)] #[derive(GodotClass)]
#[class(base=Node3D, init)] #[class(base=Node3D, init)]