cleanup some simple compiler warnings
This commit is contained in:
parent
de64b06e46
commit
1c29e6fa72
|
@ -1,6 +1,6 @@
|
|||
use std::ptr::NonNull;
|
||||
|
||||
use lyra_engine::{assets::gltf::Gltf, ecs::{system::{BatchedSystem, Criteria, CriteriaSchedule, IntoSystem}, Component, World}, game::Game, input::{Action, ActionHandler, ActionKind, ActionMapping, ActionMappingId, ActionSource, InputActionPlugin, KeyCode, LayoutId, MouseAxis, MouseInput}, math::{self, Transform, Vec3}, render::light::{directional::DirectionalLight, PointLight, SpotLight}, scene::{CameraComponent, MeshComponent}, DeltaTime};
|
||||
use lyra_engine::{assets::gltf::Gltf, ecs::{system::{BatchedSystem, Criteria, CriteriaSchedule, IntoSystem}, Component, World}, game::Game, input::{Action, ActionHandler, ActionKind, ActionMapping, ActionMappingId, ActionSource, InputActionPlugin, KeyCode, LayoutId, MouseAxis, MouseInput}, math::{self, Transform, Vec3}, render::light::{directional::DirectionalLight, SpotLight}, scene::CameraComponent, DeltaTime};
|
||||
use lyra_engine::assets::ResourceManager;
|
||||
|
||||
mod free_fly_camera;
|
||||
|
@ -89,7 +89,7 @@ async fn main() {
|
|||
window_options.cursor_visible = false; */
|
||||
}
|
||||
|
||||
let mut resman = world.get_resource_mut::<ResourceManager>();
|
||||
let resman = world.get_resource_mut::<ResourceManager>();
|
||||
//let diffuse_texture = resman.request::<Texture>("assets/happy-tree.png").unwrap();
|
||||
//let antique_camera_model = resman.request::<Model>("assets/AntiqueCamera.glb").unwrap();
|
||||
//let cube_model = resman.request::<Model>("assets/cube-texture-bin.glb").unwrap();
|
||||
|
|
|
@ -6,7 +6,7 @@ use lyra_reflect::Reflect;
|
|||
|
||||
use crate::{plugin::Plugin, game::GameStages, EventQueue};
|
||||
|
||||
use super::{Button, KeyCode, InputButtons, MouseMotion};
|
||||
use super::{Button, InputButtons, KeyCode, MouseButton, MouseMotion};
|
||||
|
||||
pub trait ActionLabel: Debug {
|
||||
/// Returns a unique hash of the label.
|
||||
|
@ -105,15 +105,6 @@ pub enum GamepadInput {
|
|||
Axis(GamepadAxis),
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
pub enum MouseButton {
|
||||
Left,
|
||||
Right,
|
||||
Middle,
|
||||
Other(u16),
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
pub enum MouseAxis {
|
||||
|
|
|
@ -83,7 +83,7 @@ impl Touches {
|
|||
/// A mouse button event
|
||||
///
|
||||
/// Translated `WindowEvent::MouseButton` from `winit` crate
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
|
||||
#[derive(Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
pub enum MouseButton {
|
||||
Left,
|
||||
Right,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use proc_macro::TokenStream;
|
||||
use proc_macro2::Ident;
|
||||
use quote::{quote, ToTokens};
|
||||
use quote::quote;
|
||||
use syn::{Generics, Path, Attribute, GenericParam, parse_macro_input, DeriveInput, TypeParamBound};
|
||||
|
||||
mod enum_derive;
|
||||
|
|
|
@ -33,9 +33,6 @@ pub use reflected_list::*;
|
|||
pub mod dynamic_tuple;
|
||||
pub use dynamic_tuple::*;
|
||||
|
||||
pub mod reflected_field;
|
||||
pub use reflected_field::*;
|
||||
|
||||
pub mod component;
|
||||
pub use component::*;
|
||||
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
use super::Reflect;
|
||||
|
||||
/// A struct that can set fields on different types of reflected values.
|
||||
pub struct ReflectField<'a> {
|
||||
val: &'a dyn Reflect,
|
||||
getter: fn() -> &'a dyn Reflect,
|
||||
setter: fn(new_val: &'a dyn Reflect),
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum FieldType {
|
||||
Struct,
|
||||
Enum,
|
||||
Tuple,
|
||||
}
|
||||
|
||||
enum FieldIdent {
|
||||
Index(usize),
|
||||
Named(String)
|
||||
}
|
||||
|
||||
impl<'a> ReflectField<'a> {
|
||||
pub fn new(reflect: &'a dyn Reflect, getter: fn() -> &'a dyn Reflect, setter: fn(new_val: &'a dyn Reflect)) -> Self {
|
||||
Self {
|
||||
val: reflect,
|
||||
getter,
|
||||
setter
|
||||
}
|
||||
}
|
||||
}
|
|
@ -216,10 +216,10 @@ pub(crate) fn world_add_child_node<B: Bundle>(world: &mut World, parent: &SceneN
|
|||
|
||||
#[cfg(test)]
|
||||
pub mod tests {
|
||||
use lyra_ecs::{query::Entities, relation::ChildOf, Component, World};
|
||||
use lyra_ecs::Component;
|
||||
use lyra_math::{Transform, Vec3};
|
||||
|
||||
use crate::{lyra_engine, SceneGraph, SceneNodeRoot};
|
||||
use crate::{lyra_engine, SceneGraph};
|
||||
|
||||
#[derive(Component)]
|
||||
pub struct FakeMesh;
|
||||
|
|
Loading…
Reference in New Issue