summaryrefslogtreecommitdiff
path: root/src/setup.rs
diff options
context:
space:
mode:
authorZhongheng Liu <z.liu@outlook.com.gr>2025-03-30 21:47:05 +0300
committerZhongheng Liu <z.liu@outlook.com.gr>2025-03-30 21:47:05 +0300
commit9bdbfd49580275f0f82fecb74bc2946c1854a651 (patch)
tree624c27999b8e00eb7b422e4e531214df11b6673c /src/setup.rs
parentaff2c30b3fa025def54cc5a249ba539d514b2a07 (diff)
downloadmartian-rescue-rs-master.tar.gz
martian-rescue-rs-master.tar.bz2
martian-rescue-rs-master.zip
feat: quick demoHEADmaster
Diffstat (limited to 'src/setup.rs')
-rw-r--r--src/setup.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/setup.rs b/src/setup.rs
index b5fbf2a..64d7447 100644
--- a/src/setup.rs
+++ b/src/setup.rs
@@ -1,5 +1,5 @@
use avian2d::prelude::{Collider, Mass, RigidBody};
-use bevy::{color::Color, core_pipeline::core_2d::Camera2d, ecs::system::Commands, math::Vec2, sprite::Sprite, transform::components::Transform};
+use bevy::{color::Color, core_pipeline::core_2d::Camera2d, ecs::system::Commands, math::Vec2, sprite::Sprite, text::{Text2d, Text2dBundle}, transform::components::Transform};
use crate::StartPlanet;
@@ -22,5 +22,7 @@ pub fn setup_starting_planet(mut cmd: Commands) {
}
pub fn setup_init(mut commands: Commands) {
commands.spawn(Camera2d);
+ commands.spawn((Text2d::new("Game - if you call it one. W A S D to move.\nLeave your planet to land on the moon,\nbut be careful of gravity pulling you."), Transform::from_xyz(0., 70., 1.)));
+
println!("Setup initial things");
}