Static World Gen and Display for the Overworld #5
4 changed files with 17 additions and 12 deletions
|
@ -1,8 +1,9 @@
|
||||||
pub mod house;
|
pub mod house;
|
||||||
pub mod overworld;
|
pub mod overworld;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Default)]
|
||||||
pub enum Activity {
|
pub enum Activity {
|
||||||
|
#[default]
|
||||||
House,
|
House,
|
||||||
Overworld
|
Overworld
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
use comfy::*;
|
use comfy::*;
|
||||||
|
|
||||||
|
pub mod worldgen;
|
||||||
|
|
||||||
pub fn draw(_state: &crate::State, _engine: &comfy::EngineContext) {
|
pub fn draw(_state: &crate::State, _engine: &comfy::EngineContext) {
|
||||||
draw_circle(vec2(0.0, 0.0), 0.5, GREEN, 0);
|
draw_circle(vec2(0.0, 0.0), 0.5, GREEN, 0);
|
||||||
}
|
}
|
||||||
|
|
9
src/activities/overworld/worldgen.rs
Normal file
9
src/activities/overworld/worldgen.rs
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct Overworld;
|
||||||
|
|
||||||
|
impl Default for Overworld {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self
|
||||||
|
}
|
||||||
|
}
|
15
src/main.rs
15
src/main.rs
|
@ -1,22 +1,15 @@
|
||||||
mod activities;
|
mod activities;
|
||||||
mod game;
|
mod game;
|
||||||
|
|
||||||
use activities::Activity;
|
use activities::{overworld::worldgen::Overworld, Activity};
|
||||||
use comfy::*;
|
use comfy::*;
|
||||||
|
|
||||||
const GAME_NAME: &str = "Powercreep";
|
const GAME_NAME: &str = "Powercreep";
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Default)]
|
||||||
struct State {
|
struct State {
|
||||||
activity: Activity
|
activity: Activity,
|
||||||
}
|
overworld: Overworld,
|
||||||
|
|
||||||
impl Default for State {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self {
|
|
||||||
activity: Activity::House
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl GameLoop for State {
|
impl GameLoop for State {
|
||||||
|
|
Loading…
Reference in a new issue