Проектная работа - WIP
This commit is contained in:
@@ -2,7 +2,7 @@ use std::time::Duration;
|
||||
|
||||
use bevy::{prelude::*, winit::WinitSettings};
|
||||
|
||||
use crate::domain::{Direction, FRAMES_PER_SECOND};
|
||||
use crate::domain::{Direction, FRAMES_PER_SECOND, Inert, SNAKE_VELOCITY, Velocity};
|
||||
|
||||
/// Инициализация игрового мира
|
||||
pub fn startup(mut commands: Commands, mut winit: ResMut<WinitSettings>) {
|
||||
@@ -17,6 +17,8 @@ pub fn startup(mut commands: Commands, mut winit: ResMut<WinitSettings>) {
|
||||
.spawn((
|
||||
Head,
|
||||
Direction::default(),
|
||||
Inert::default(),
|
||||
Velocity(SNAKE_VELOCITY as f32),
|
||||
Sprite::from_color(
|
||||
Color::srgb(1., 1., 1.),
|
||||
vec2(HEAD_SIZE as f32, HEAD_SIZE as f32),
|
||||
|
||||
Reference in New Issue
Block a user