I have the following main.rs
mod player;
use bevy::{
prelude::*,
window::{CursorGrabMode, CursorOptions, PresentMode, WindowMode},
};
use bevy_aseprite_ultra::prelude::*;
fn main() {
let mut app = App::new();
let window = Window {
title: "Etude".into(),
resolution: (1920., 1080.).into(),
present_mode: PresentMode::Mailbox,
mode: WindowMode::BorderlessFullscreen(MonitorSelection::Index(0)),
focused: true,
cursor_options: CursorOptions {
visible: false,
grab_mode: CursorGrabMode::Locked,
hit_test: true,
},
..default()
};
app.add_plugins(DefaultPlugins.set(WindowPlugin {
primary_window: Some(window),
..default()
}))
.add_plugins(AsepriteUltraPlugin)
.add_plugins(player::plugin)
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands, server: Res<AssetServer>) {
commands.spawn(Camera2d);
commands.spawn((
AseSpriteAnimation {
animation: Animation::tag("default"),
aseprite: server.load(r"cadenza.aseprite"),
},
Transform::from_xyz(0., 0., 0.),
));
}
and the following player.rs
(posted later to bypass nitro limit)
When I compile and try pressing the relevant keys, ZERO movement is seen in the player character, why is this?