Compare commits
5 Commits
cda93ffaac
...
e6d07de734
| Author | SHA1 | Date | |
|---|---|---|---|
| e6d07de734 | |||
| 158fffcfed | |||
| ca6adb70de | |||
| 19fc76bf77 | |||
| 600f5b4986 |
@ -10,13 +10,13 @@ glow_enabled = true
|
|||||||
|
|
||||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_oh8vq"]
|
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_oh8vq"]
|
||||||
|
|
||||||
[node name="player" type="LocalPlayer" unique_id=863055906 node_paths=PackedStringArray("camera", "soldier_mesh", "collider", "splorch", "dead_cam_target", "respawn_label", "ball_origin", "weapon_node", "pause_panel", "exit_to_lobby", "settings_panel", "scoreboard")]
|
[node name="player" type="LocalPlayer" unique_id=863055906 node_paths=PackedStringArray("camera", "soldier_mesh", "collider", "effects", "dead_cam_target", "respawn_label", "ball_origin", "weapon_node", "pause_panel", "exit_to_lobby", "settings_panel", "scoreboard")]
|
||||||
look_sensitivity = 1.5
|
look_sensitivity = 1.5
|
||||||
camera = NodePath("camera_3d")
|
camera = NodePath("camera_3d")
|
||||||
move_speed = 5.0
|
move_speed = 5.0
|
||||||
soldier_mesh = NodePath("soldier_m")
|
soldier_mesh = NodePath("soldier_m")
|
||||||
collider = NodePath("collision_shape_3d2")
|
collider = NodePath("collision_shape_3d2")
|
||||||
splorch = NodePath("splorch")
|
effects = NodePath("effects")
|
||||||
dead_cam_target = NodePath("dead_camera_target")
|
dead_cam_target = NodePath("dead_camera_target")
|
||||||
respawn_label = NodePath("respawn_label")
|
respawn_label = NodePath("respawn_label")
|
||||||
ball_origin = NodePath("camera_3d")
|
ball_origin = NodePath("camera_3d")
|
||||||
@ -44,7 +44,7 @@ transform = Transform3D(-0.5, 0, -4.371139e-08, 0, 0.5, 0, 4.371139e-08, 0, -0.5
|
|||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||||
shape = SubResource("CapsuleShape3D_oh8vq")
|
shape = SubResource("CapsuleShape3D_oh8vq")
|
||||||
|
|
||||||
[node name="splorch" parent="." unique_id=986677517 instance=ExtResource("2_ywmwa")]
|
[node name="effects" parent="." unique_id=986677517 instance=ExtResource("2_ywmwa")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.16157162, 1.4223524, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.16157162, 1.4223524, 0)
|
||||||
|
|
||||||
[node name="dead_camera_target" type="Node3D" parent="." unique_id=559969559]
|
[node name="dead_camera_target" type="Node3D" parent="." unique_id=559969559]
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
sound_emitter = NodePath("sound_emitter")
|
sound_emitter = NodePath("sound_emitter")
|
||||||
bullet_prefab = ExtResource("1_m84jv")
|
bullet_prefab = ExtResource("1_m84jv")
|
||||||
bullet_source = NodePath("bullet_source")
|
bullet_source = NodePath("bullet_source")
|
||||||
|
cooldown = 1.5
|
||||||
|
|
||||||
[node name="Raygun" parent="." unique_id=1928455392 instance=ExtResource("1_ckadf")]
|
[node name="Raygun" parent="." unique_id=1928455392 instance=ExtResource("1_ckadf")]
|
||||||
|
|
||||||
|
|||||||
@ -5,11 +5,11 @@
|
|||||||
|
|
||||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_1cgct"]
|
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_1cgct"]
|
||||||
|
|
||||||
[node name="player" type="RemotePlayer" unique_id=845968872 node_paths=PackedStringArray("soldier_mesh", "collider", "splorch", "spectator_camera", "ball_origin", "name_label")]
|
[node name="player" type="RemotePlayer" unique_id=845968872 node_paths=PackedStringArray("soldier_mesh", "collider", "effects", "spectator_camera", "ball_origin", "name_label")]
|
||||||
move_speed = 5.0
|
move_speed = 5.0
|
||||||
soldier_mesh = NodePath("soldier_m")
|
soldier_mesh = NodePath("soldier_m")
|
||||||
collider = NodePath("collision_shape_3d")
|
collider = NodePath("collision_shape_3d")
|
||||||
splorch = NodePath("gpu_particles_3d")
|
effects = NodePath("effects")
|
||||||
health = 100
|
health = 100
|
||||||
spectator_camera = NodePath("spectate_root/spectate_camera")
|
spectator_camera = NodePath("spectate_root/spectate_camera")
|
||||||
ball_origin = NodePath("ball_origin")
|
ball_origin = NodePath("ball_origin")
|
||||||
@ -24,7 +24,7 @@ transform = Transform3D(-0.5, 0, -4.371139e-08, 0, 0.5, 0, 4.371139e-08, 0, -0.5
|
|||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||||
shape = SubResource("CapsuleShape3D_1cgct")
|
shape = SubResource("CapsuleShape3D_1cgct")
|
||||||
|
|
||||||
[node name="gpu_particles_3d" parent="." unique_id=986677517 instance=ExtResource("2_orxjf")]
|
[node name="effects" parent="." unique_id=986677517 instance=ExtResource("2_orxjf")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.4540546, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.4540546, 0)
|
||||||
|
|
||||||
[node name="spectate_root" type="Node3D" parent="." unique_id=624336254]
|
[node name="spectate_root" type="Node3D" parent="." unique_id=624336254]
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
[gd_scene format=3 uid="uid://cl66unms2gim0"]
|
[gd_scene format=3 uid="uid://cl66unms2gim0"]
|
||||||
|
|
||||||
|
[ext_resource type="AudioStream" uid="uid://bfg31e3s4jv8c" path="res://assets/Hit.mp3" id="1_2hdmt"]
|
||||||
|
|
||||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_1cgct"]
|
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_1cgct"]
|
||||||
particle_flag_align_y = true
|
particle_flag_align_y = true
|
||||||
direction = Vector3(0, 1, 0)
|
direction = Vector3(0, 1, 0)
|
||||||
@ -23,7 +25,11 @@ section_length = 0.1
|
|||||||
section_rings = 10
|
section_rings = 10
|
||||||
curve = SubResource("Curve_yli5f")
|
curve = SubResource("Curve_yli5f")
|
||||||
|
|
||||||
[node name="gpu_particles_3d" type="GPUParticles3D" unique_id=986677517]
|
[node name="player_effects" type="PlayerEffects" unique_id=1493455892 node_paths=PackedStringArray("splorch", "hit_sound")]
|
||||||
|
splorch = NodePath("splorch")
|
||||||
|
hit_sound = NodePath("hit_sound")
|
||||||
|
|
||||||
|
[node name="splorch" type="GPUParticles3D" parent="." unique_id=986677517]
|
||||||
emitting = false
|
emitting = false
|
||||||
amount = 20
|
amount = 20
|
||||||
one_shot = true
|
one_shot = true
|
||||||
@ -32,3 +38,6 @@ trail_enabled = true
|
|||||||
trail_lifetime = 0.5
|
trail_lifetime = 0.5
|
||||||
process_material = SubResource("ParticleProcessMaterial_1cgct")
|
process_material = SubResource("ParticleProcessMaterial_1cgct")
|
||||||
draw_pass_1 = SubResource("TubeTrailMesh_wwb7k")
|
draw_pass_1 = SubResource("TubeTrailMesh_wwb7k")
|
||||||
|
|
||||||
|
[node name="hit_sound" type="AudioStreamPlayer3D" parent="." unique_id=345049143]
|
||||||
|
stream = ExtResource("1_2hdmt")
|
||||||
|
|||||||
@ -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";
|
||||||
|
|||||||
@ -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;
|
||||||
|
|
||||||
|
|||||||
@ -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)]
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
use std::net::SocketAddr;
|
use std::net::SocketAddr;
|
||||||
|
|
||||||
use godot::{global::godot_print, obj::Singleton};
|
use godot::obj::Singleton;
|
||||||
use teanet::PeerMessage;
|
use teanet::PeerMessage;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
|||||||
26
rust/src/player/effects.rs
Normal file
26
rust/src/player/effects.rs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
use godot::{
|
||||||
|
classes::{AudioStreamPlayer3D, GpuParticles3D},
|
||||||
|
prelude::*,
|
||||||
|
};
|
||||||
|
|
||||||
|
#[derive(GodotClass)]
|
||||||
|
#[class(base=Node3D, init)]
|
||||||
|
pub struct PlayerEffects {
|
||||||
|
#[export]
|
||||||
|
splorch: Option<Gd<GpuParticles3D>>,
|
||||||
|
#[export]
|
||||||
|
hit_sound: Option<Gd<AudioStreamPlayer3D>>,
|
||||||
|
|
||||||
|
base: Base<Node3D>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PlayerEffects {
|
||||||
|
pub fn death(&mut self) {
|
||||||
|
if let Some(splorch) = &mut self.splorch {
|
||||||
|
splorch.set_emitting(true);
|
||||||
|
}
|
||||||
|
if let Some(sfx) = &mut self.hit_sound {
|
||||||
|
sfx.play();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -2,9 +2,8 @@ use std::{f32::consts::PI, ops::Neg};
|
|||||||
|
|
||||||
use godot::{
|
use godot::{
|
||||||
classes::{
|
classes::{
|
||||||
Button, Camera3D, CharacterBody3D, CollisionShape3D, GpuParticles3D, ICharacterBody3D,
|
Button, Camera3D, CharacterBody3D, CollisionShape3D, ICharacterBody3D, Input, InputEvent,
|
||||||
Input, InputEvent, InputEventMouseMotion, Label, Label3D, Panel, PanelContainer,
|
InputEventMouseMotion, Label, Label3D, Panel, PanelContainer, input::MouseMode,
|
||||||
input::MouseMode,
|
|
||||||
},
|
},
|
||||||
obj::WithBaseField,
|
obj::WithBaseField,
|
||||||
prelude::*,
|
prelude::*,
|
||||||
@ -22,11 +21,19 @@ use crate::{
|
|||||||
},
|
},
|
||||||
util::{NetVector3, cast_ray},
|
util::{NetVector3, cast_ray},
|
||||||
},
|
},
|
||||||
soldier_mesh::SoldierMesh,
|
player::{
|
||||||
|
effects::PlayerEffects,
|
||||||
|
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 effects;
|
||||||
|
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,
|
||||||
@ -183,7 +190,7 @@ pub struct LocalPlayer {
|
|||||||
#[export]
|
#[export]
|
||||||
collider: Option<Gd<CollisionShape3D>>,
|
collider: Option<Gd<CollisionShape3D>>,
|
||||||
#[export]
|
#[export]
|
||||||
splorch: Option<Gd<GpuParticles3D>>,
|
effects: Option<Gd<PlayerEffects>>,
|
||||||
#[export]
|
#[export]
|
||||||
dead_cam_target: Option<Gd<Node3D>>,
|
dead_cam_target: Option<Gd<Node3D>>,
|
||||||
#[export]
|
#[export]
|
||||||
@ -290,15 +297,11 @@ impl IPlayer for LocalPlayer {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.shoot_cd <= 0. {
|
let rid = self.base().get_rid();
|
||||||
let rid = self.base().get_rid();
|
if let Some(mut weapon) = self.get_weapon() {
|
||||||
if let Some(mut weapon) = self.get_weapon() {
|
weapon
|
||||||
weapon
|
.dyn_bind_mut()
|
||||||
.dyn_bind_mut()
|
.shoot(rid, self.player_id.unwrap_or(0), to, deal_damage)
|
||||||
.shoot(rid, self.player_id.unwrap_or(0), to, deal_damage);
|
|
||||||
}
|
|
||||||
self.shoot_cd = 0.2;
|
|
||||||
true
|
|
||||||
} else {
|
} else {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
@ -336,8 +339,8 @@ impl IPlayer for LocalPlayer {
|
|||||||
if let Some(mut collider) = self.collider.take() {
|
if let Some(mut collider) = self.collider.take() {
|
||||||
collider.queue_free();
|
collider.queue_free();
|
||||||
}
|
}
|
||||||
if let Some(splorch) = &mut self.splorch {
|
if let Some(effects) = &mut self.effects {
|
||||||
splorch.set_emitting(true);
|
effects.bind_mut().death();
|
||||||
}
|
}
|
||||||
if let Some(mut weapon) = self.weapon.take() {
|
if let Some(mut weapon) = self.weapon.take() {
|
||||||
weapon.queue_free();
|
weapon.queue_free();
|
||||||
@ -653,7 +656,7 @@ pub struct RemotePlayer {
|
|||||||
#[export]
|
#[export]
|
||||||
collider: Option<Gd<CollisionShape3D>>,
|
collider: Option<Gd<CollisionShape3D>>,
|
||||||
#[export]
|
#[export]
|
||||||
splorch: Option<Gd<GpuParticles3D>>,
|
effects: Option<Gd<PlayerEffects>>,
|
||||||
#[export]
|
#[export]
|
||||||
health: i32,
|
health: i32,
|
||||||
#[export]
|
#[export]
|
||||||
@ -742,17 +745,13 @@ impl IPlayer for RemotePlayer {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.shoot_cd <= 0. {
|
let rid = self.base().get_rid();
|
||||||
let rid = self.base().get_rid();
|
if let Some(mesh) = &mut self.soldier_mesh
|
||||||
if let Some(mesh) = &mut self.soldier_mesh
|
&& let Some(mut weapon) = mesh.bind().get_weapon()
|
||||||
&& let Some(mut weapon) = mesh.bind().get_weapon()
|
{
|
||||||
{
|
weapon
|
||||||
weapon
|
.dyn_bind_mut()
|
||||||
.dyn_bind_mut()
|
.shoot(rid, self.player_id.unwrap_or(0), to, deal_damage)
|
||||||
.shoot(rid, self.player_id.unwrap_or(0), to, deal_damage);
|
|
||||||
}
|
|
||||||
self.shoot_cd = 0.2;
|
|
||||||
true
|
|
||||||
} else {
|
} else {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
@ -790,8 +789,8 @@ impl IPlayer for RemotePlayer {
|
|||||||
if let Some(mut collider) = self.collider.take() {
|
if let Some(mut collider) = self.collider.take() {
|
||||||
collider.queue_free();
|
collider.queue_free();
|
||||||
}
|
}
|
||||||
if let Some(splorch) = &mut self.splorch {
|
if let Some(effects) = &mut self.effects {
|
||||||
splorch.set_emitting(true);
|
effects.bind_mut().death();
|
||||||
}
|
}
|
||||||
if let Some(mut name) = self.name_label.take() {
|
if let Some(mut name) = self.name_label.take() {
|
||||||
name.queue_free();
|
name.queue_free();
|
||||||
@ -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},
|
||||||
};
|
};
|
||||||
@ -4,12 +4,12 @@ use serde::{Deserialize, Serialize};
|
|||||||
use crate::{
|
use crate::{
|
||||||
ball::Ball,
|
ball::Ball,
|
||||||
game_manager::{Game, GameOption},
|
game_manager::{Game, GameOption},
|
||||||
net::{network_manager::NetworkManager, util::cast_ray},
|
net::util::cast_ray,
|
||||||
player::{DamageSource, IPlayer},
|
player::{DamageSource, IPlayer},
|
||||||
};
|
};
|
||||||
|
|
||||||
pub trait Weapon {
|
pub trait Weapon {
|
||||||
fn shoot(&mut self, player_rid: Rid, player_id: u16, to: Vector3, deal_damage: bool);
|
fn shoot(&mut self, player_rid: Rid, player_id: u16, to: Vector3, deal_damage: bool) -> bool;
|
||||||
fn get_type(&self) -> WeaponType;
|
fn get_type(&self) -> WeaponType;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,12 +29,28 @@ pub struct Raygun {
|
|||||||
#[export]
|
#[export]
|
||||||
bullet_source: Option<Gd<Node3D>>,
|
bullet_source: Option<Gd<Node3D>>,
|
||||||
|
|
||||||
|
#[export]
|
||||||
|
cooldown: f64,
|
||||||
|
|
||||||
|
cooldown_remaining: f64,
|
||||||
|
|
||||||
base: Base<Node3D>,
|
base: Base<Node3D>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[godot_api]
|
||||||
|
impl INode3D for Raygun {
|
||||||
|
fn process(&mut self, delta: f64) {
|
||||||
|
self.cooldown_remaining -= delta;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[godot_dyn]
|
#[godot_dyn]
|
||||||
impl Weapon for Raygun {
|
impl Weapon for Raygun {
|
||||||
fn shoot(&mut self, player: Rid, player_id: u16, to: Vector3, deal_damage: bool) {
|
fn shoot(&mut self, player: Rid, player_id: u16, to: Vector3, deal_damage: bool) -> bool {
|
||||||
|
if self.cooldown_remaining > 0. {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if let Some(emitter) = &mut self.sound_emitter {
|
if let Some(emitter) = &mut self.sound_emitter {
|
||||||
emitter.play();
|
emitter.play();
|
||||||
}
|
}
|
||||||
@ -89,6 +105,10 @@ impl Weapon for Raygun {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.cooldown_remaining = self.cooldown;
|
||||||
|
|
||||||
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_type(&self) -> WeaponType {
|
fn get_type(&self) -> WeaponType {
|
||||||
@ -148,7 +168,9 @@ pub struct BallWeapon {
|
|||||||
|
|
||||||
#[godot_dyn]
|
#[godot_dyn]
|
||||||
impl Weapon for BallWeapon {
|
impl Weapon for BallWeapon {
|
||||||
fn shoot(&mut self, _: Rid, _: u16, _: Vector3, _: bool) {}
|
fn shoot(&mut self, _: Rid, _: u16, _: Vector3, _: bool) -> bool {
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
fn get_type(&self) -> WeaponType {
|
fn get_type(&self) -> WeaponType {
|
||||||
WeaponType::Ball
|
WeaponType::Ball
|
||||||
@ -1,14 +1,11 @@
|
|||||||
use godot::{
|
use godot::{
|
||||||
classes::{
|
classes::{Button, HBoxContainer, IPanel, Label, Panel},
|
||||||
Button, HBoxContainer, IPanel, Label, Panel, VBoxContainer, box_container::AlignmentMode,
|
|
||||||
},
|
|
||||||
global::HorizontalAlignment,
|
|
||||||
prelude::*,
|
prelude::*,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
game_manager::{Game, GameManager},
|
game_manager::{Game, GameManager},
|
||||||
ui::{player_listing::PlayerListing, player_listings::PlayerListings},
|
ui::player_listings::PlayerListings,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(GodotClass)]
|
#[derive(GodotClass)]
|
||||||
|
|||||||
@ -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)]
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
use godot::{
|
use godot::{
|
||||||
classes::{CompressedTexture2D, HBoxContainer, IHBoxContainer, Label, Texture2D, TextureRect},
|
classes::{HBoxContainer, IHBoxContainer, Label, Texture2D, TextureRect},
|
||||||
prelude::*,
|
prelude::*,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -5,10 +5,7 @@ use godot::{
|
|||||||
prelude::*,
|
prelude::*,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::{
|
use crate::{game_settings::GameSettingsManager, ui::slider::SliderContainer};
|
||||||
game_settings::{GameSettings, GameSettingsManager},
|
|
||||||
ui::slider::SliderContainer,
|
|
||||||
};
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Hash)]
|
#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Eq, Hash)]
|
||||||
pub enum Setting {
|
pub enum Setting {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user