buildings
This commit is contained in:
@@ -3,7 +3,7 @@ use bevy::core_pipeline::prepass::DepthPrepass;
|
||||
use bevy::input::mouse::{MouseMotion, MouseScrollUnit, MouseWheel};
|
||||
use bevy::prelude::*;
|
||||
use bevy::window::CursorGrabMode;
|
||||
use shared::states::GameState;
|
||||
use shared::states::MenuState;
|
||||
use shared::tags::MainCamera;
|
||||
use world_generation::hex_utils::HexCoord;
|
||||
use world_generation::prelude::Map;
|
||||
@@ -18,7 +18,7 @@ impl Plugin for PhosCameraPlugin {
|
||||
|
||||
app.add_systems(PreStartup, setup);
|
||||
|
||||
app.add_systems(Update, rts_camera_system.run_if(in_state(GameState::Playing)));
|
||||
app.add_systems(Update, rts_camera_system.run_if(in_state(MenuState::InGame)));
|
||||
app.add_systems(PostUpdate, limit_camera_bounds);
|
||||
//Free Cam
|
||||
//app.add_systems(Update, (grab_mouse, (update_camera, update_camera_mouse).chain()));
|
||||
|
||||
@@ -7,7 +7,7 @@ use bevy::{
|
||||
};
|
||||
use bevy_inspector_egui::quick::ResourceInspectorPlugin;
|
||||
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
|
||||
use shared::states::{GameState, GameplayState};
|
||||
use shared::states::{GameplayState, MenuState};
|
||||
use world_generation::{
|
||||
biome_painter::*,
|
||||
heightmap::generate_heightmap,
|
||||
@@ -273,8 +273,8 @@ fn spawn_map(
|
||||
biome_painters: Res<Assets<BiomePainterAsset>>,
|
||||
painter: Res<CurrentBiomePainter>,
|
||||
mut generator_state: ResMut<NextState<GeneratorState>>,
|
||||
cur_game_state: Res<State<GameState>>,
|
||||
mut game_state: ResMut<NextState<GameState>>,
|
||||
cur_game_state: Res<State<MenuState>>,
|
||||
mut game_state: ResMut<NextState<MenuState>>,
|
||||
mut gameplay_state: ResMut<NextState<GameplayState>>,
|
||||
) {
|
||||
let b_painter = biome_painters.get(painter.handle.clone());
|
||||
@@ -332,8 +332,8 @@ fn spawn_map(
|
||||
|
||||
commands.insert_resource(registry);
|
||||
generator_state.set(GeneratorState::Idle);
|
||||
if cur_game_state.get() != &GameState::Playing {
|
||||
game_state.set(GameState::Playing);
|
||||
if cur_game_state.get() != &MenuState::InGame {
|
||||
game_state.set(MenuState::InGame);
|
||||
gameplay_state.set(GameplayState::PlaceHQ);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ use bevy_rapier3d::plugin::{NoUserData, RapierPhysicsPlugin};
|
||||
use buildings::BuildingPugin;
|
||||
use iyes_perf_ui::prelude::*;
|
||||
use shared::despawn::DespawnPuglin;
|
||||
use shared::states::{GameState, GameplayState};
|
||||
use shared::states::{MenuState, GameplayState};
|
||||
use world_generation::biome_painter::BiomePainterPlugin;
|
||||
use world_generation::tile_manager::TileAssetPlugin;
|
||||
use world_generation::tile_mapper::TileMapperAssetPlugin;
|
||||
@@ -29,7 +29,7 @@ impl Plugin for PhosGamePlugin {
|
||||
DespawnPuglin,
|
||||
));
|
||||
|
||||
app.insert_state(GameState::Startup);
|
||||
app.insert_state(MenuState::Startup);
|
||||
app.insert_state(GameplayState::Waiting);
|
||||
|
||||
//Systems - Startup
|
||||
|
||||
Reference in New Issue
Block a user