Skip to content

Commit

Permalink
Merge PR #13 - Crate 0.6 update
Browse files Browse the repository at this point in the history
Fixed CI and added info to examples
  • Loading branch information
BlackPhlox authored Jan 27, 2022
2 parents 6a0aeb4 + 7b194fc commit 100a15d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 17 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ jobs:
needs: update
steps:
- uses: actions/checkout@v2
- name: Update apt
run: sudo apt update
- name: Install libudev
run: sudo apt install libudev-dev
- name: Install libxkbcommon
run: sudo apt install libxkbcommon-dev
- name: Install libwayland
run: sudo apt install libwayland-dev
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand Down
16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
[package]
name = "bevy_flycam"
version = "0.6.0"
authors = ["Spencer Burris <[email protected]>"]
categories = ["game-engines", "game-development"]
edition = "2021"
license = "ISC"
description = "Basic first-person fly camera for the Bevy game engine"
edition = "2018"
homepage = "https://github.com/sburris0/bevy_flycam/"
keywords = ["gamedev", "bevy", "3d", "camera"]
license = "ISC"
name = "bevy_flycam"
readme = "README.md"
repository = "https://github.com/sburris0/bevy_flycam/"
readme = "README.md"
keywords = ["gamedev", "bevy", "3d", "camera"]
categories = ["game-engines", "game-development"]
resolver = "2"
version = "0.6.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
bevy = {version = "0.6", default-features = false, features = ["render"]}

[dev-dependencies]
bevy = {version = "0.6", default-features = false, features = ["render", "bevy_render", "bevy_winit"]}
bevy = {version = "0.6", default-features = false, features = ["bevy_winit"]}

[target.'cfg(target_os = "linux")'.dev-dependencies]
bevy = {version = "0.6", default-features = false, features = ["x11", "wayland"]}
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
![docs.rs](https://img.shields.io/docsrs/bevy_flycam)


A basic first-person fly camera for Bevy 0.5
A basic first-person fly camera for Bevy 0.6

## Controls
* WASD to move horizontally
Expand All @@ -25,15 +25,15 @@ There are a few notable differences from [bevy_fly_camera](https://github.com/mc
1. Add to `Cargo.toml` or copy `lib.rs` to your own file
```toml
[dependencies]
bevy = "0.5"
bevy = "0.6"
bevy_flycam = "*"
```

or

```toml
[dependencies]
bevy = "0.5"
bevy = "0.6"
bevy_flycam = { git = "https://github.com/sburris0/bevy_flycam" }
```

Expand All @@ -48,7 +48,7 @@ Use `NoCameraPlayerPlugin` if you do not want this and make sure to use `.insert
```rust
#[bevy_main]
fn main() {
App::build()
App::new()
.add_plugins(DefaultPlugins)
.add_plugin(PlayerPlugin)
.run();
Expand All @@ -63,7 +63,7 @@ To modify player movement speed or mouse sensitivity, import `bevy_flycam::Movem
```Rust
#[bevy_main]
fn main() {
App::build()
App::new()
.add_plugins(DefaultPlugins)
.add_plugin(PlayerPlugin)
.insert_resource(MovementSettings {
Expand Down
7 changes: 6 additions & 1 deletion examples/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fn main() {
sensitivity: 0.00015, // default: 0.00012
speed: 12.0, // default: 12.0
})
.add_startup_system(setup.system())
.add_startup_system(setup)
.run();
}

Expand Down Expand Up @@ -45,4 +45,9 @@ fn setup(
transform: Transform::from_xyz(4.0, 8.0, 4.0),
..Default::default()
});

info!("Move camera around by using WASD for lateral movement");
info!("Use Left Shift and Spacebar for vertical movement");
info!("Use the mouse to look around");
info!("Press Esc to hide or show the mouse cursor");
}
9 changes: 6 additions & 3 deletions examples/scroll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ fn main() {
})
// Setting initial state
.add_state(ScrollType::MovementSpeed)
.add_startup_system(setup.system())
.add_system(switch_scroll_type.system())
.add_system(scroll.system())
.add_startup_system(setup)
.add_system(switch_scroll_type)
.add_system(scroll)
.run();
}

Expand Down Expand Up @@ -66,6 +66,9 @@ fn setup(

// add plugin
commands.spawn_bundle(camera).insert(FlyCam);

info!("Press 'Z' to switch between Movement Speed and Zoom");
info!("Changing the selected value by scrolling the mousewheel");
}

// Listens for Z key being pressed and toggles between the two scroll-type states
Expand Down

0 comments on commit 100a15d

Please sign in to comment.