pub startpos
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
use bevy::prelude::*;
|
||||
|
||||
use crate::player::{Player, START_POSITION};
|
||||
|
||||
#[derive(Resource)]
|
||||
pub struct Depth(pub f32);
|
||||
|
||||
fn update_depth(mut depth: ResMut<Depth>, player: Single<&Transform, With<Player>>) {
|
||||
depth.0 = START_POSITION.y - player.translation.y;
|
||||
}
|
||||
|
||||
fn spawn_depth_text() {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn update_depth_text() {
|
||||
todo!()
|
||||
}
|
||||
Reference in New Issue
Block a user