Removed Debug prompts and added sdl2 libs in the repo to try and make windows easier for the end user
This commit is contained in:
@@ -26,7 +26,7 @@ impl Game{
|
||||
}
|
||||
pub fn up(&mut self){
|
||||
// 'w' or the up arrow has been pressed
|
||||
println!("DEBUG: Up is pressed");
|
||||
//println!("DEBUG: Up is pressed");
|
||||
self.main_bloc.velocity.y -= BLOC_SPEED as i32;
|
||||
if self.main_bloc.velocity.y < -MAX_SPEED as i32{
|
||||
self.main_bloc.velocity.y = -MAX_SPEED as i32;
|
||||
@@ -34,7 +34,7 @@ impl Game{
|
||||
}
|
||||
pub fn down(&mut self){
|
||||
// 's' or the down arrow has been pressed
|
||||
println!("DEBUG: Down is pressed");
|
||||
//println!("DEBUG: Down is pressed");
|
||||
self.main_bloc.velocity.y += BLOC_SPEED as i32;
|
||||
if self.main_bloc.velocity.y > MAX_SPEED as i32{
|
||||
self.main_bloc.velocity.y = MAX_SPEED as i32;
|
||||
@@ -42,7 +42,7 @@ impl Game{
|
||||
}
|
||||
pub fn left(&mut self){
|
||||
// 'a' or the left arrow has been pressed
|
||||
println!("DEBUG: Left is pressed");
|
||||
//println!("DEBUG: Left is pressed");
|
||||
self.main_bloc.velocity.x -= BLOC_SPEED as i32;
|
||||
if self.main_bloc.velocity.x < -MAX_SPEED as i32{
|
||||
self.main_bloc.velocity.x = -MAX_SPEED as i32;
|
||||
@@ -50,7 +50,7 @@ impl Game{
|
||||
}
|
||||
pub fn right(&mut self){
|
||||
// 'd' or the right arrow has been pressed
|
||||
println!("DEBUG: Right is pressed");
|
||||
//println!("DEBUG: Right is pressed");
|
||||
self.main_bloc.velocity.x += BLOC_SPEED as i32;
|
||||
if self.main_bloc.velocity.y > MAX_SPEED as i32{
|
||||
self.main_bloc.velocity.y = MAX_SPEED as i32;
|
||||
|
||||
Reference in New Issue
Block a user