init commit
This commit is contained in:
commit
b4f34ec038
7 changed files with 4587 additions and 0 deletions
7
.cargo/config.toml
Normal file
7
.cargo/config.toml
Normal file
|
@ -0,0 +1,7 @@
|
|||
[target.x86_64-unknown-linux-gnu]
|
||||
linker = "clang"
|
||||
rustflags = [
|
||||
"-Clink-arg=-fuse-ld=mold", # Use LLD Linker
|
||||
"-Zshare-generics=y", # (Nightly) Make the current crate share its generic instantiations
|
||||
"-Zthreads=0", # (Nightly) Use improved multithreading with the recommended amount of threads.
|
||||
]
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/target
|
4505
Cargo.lock
generated
Normal file
4505
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
17
Cargo.toml
Normal file
17
Cargo.toml
Normal file
|
@ -0,0 +1,17 @@
|
|||
[package]
|
||||
name = "that-has-no-name"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
bevy = "0.13.2"
|
||||
bevy-inspector-egui = "0.24.0"
|
||||
|
||||
[profile.dev]
|
||||
opt-level = 1
|
||||
|
||||
# enable optimizations in dependencies
|
||||
[profile.dev.package."*"]
|
||||
opt-level = 3
|
6
README.md
Normal file
6
README.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
# there is something inside me that has no name
|
||||
|
||||
original concept sketched out for QGJam, 2023 Oct -- [beginning of godot implementation](https://github.com/Crude-Dark-Matter/that-has-no-name/)
|
||||
|
||||
building with [bevy](https://bevyengine.org/)
|
||||
|
2
rust-toolchain.toml
Normal file
2
rust-toolchain.toml
Normal file
|
@ -0,0 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly"
|
49
src/main.rs
Normal file
49
src/main.rs
Normal file
|
@ -0,0 +1,49 @@
|
|||
use bevy::prelude::*
|
||||
use bevy_inspector_egui::quick::WorldInspectorPlugin;
|
||||
const VERSION: &str = "0.1.0";
|
||||
// display constants
|
||||
const WINDOW_WIDTH: f32 = 1024.0;
|
||||
const WINDOW_HEIGHT: f32 = 768.0;
|
||||
|
||||
#[derive(Debug, Clone, Copy, Default, Eq, PartialEq, Hash, States)]
|
||||
enum AppState {
|
||||
#[default]
|
||||
Menu,
|
||||
InGame,
|
||||
}
|
||||
|
||||
fn start_app() {
|
||||
println!("starting app!");
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let app_window = Some(Window {
|
||||
title: format!("there is something inside me that has no name:{}", VERSION).into(),
|
||||
resolution: WindowResolution::new(WINDOW_WIDTH, WINDOW_HEIGHT),
|
||||
resizable: false,
|
||||
..default()
|
||||
});
|
||||
|
||||
App::new()
|
||||
.add_systems(Startup, start_app)
|
||||
.add_plugins((
|
||||
DefaultPlugins.set(WindowPlugin {
|
||||
primary_window: app_window,
|
||||
..default()
|
||||
}),
|
||||
StartAppPlugin,
|
||||
))
|
||||
.add_plugins(
|
||||
WorldInspectorPlugin::default().run_if(input_toggle_active(true, KeyCode::Escape)),
|
||||
)
|
||||
.run();
|
||||
}
|
||||
|
||||
pub struct StartAppPlugin;
|
||||
|
||||
impl Plugin for StartAppPlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
app.init_state::<AppState>().add_systems(Startup, start_app);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in a new issue