Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update for changes to SDL_Perl.

  • Loading branch information...
commit 0ced528e4c1d4305edc6f7c4d1757a430e2fcbb2 1 parent 31291b6
@jtpalmer authored
View
4 lib/Games/Maze/SDL/Controller.pm
@@ -34,8 +34,8 @@ sub BUILD {
sub on_event {
my ( $self, $e ) = @_;
- return 0 if $e->type == SDL_QUIT;
- return 0 if $e->key_sym == SDLK_ESCAPE;
+ $self->stop if $e->type == SDL_QUIT;
+ $self->stop if $e->key_sym == SDLK_ESCAPE;
my $player = $self->model->{player};
View
4 lib/Games/Maze/SDL/Model/Player.pm
@@ -135,7 +135,9 @@ sub velocity {
}
sub move {
- my ( $self, $dt ) = @_;
+ my ( $self, $step ) = @_;
+
+ my $dt = $step * 0.025;
my %d = ( x => $self->x, y => $self->y );
my %v = ( x => $self->velocity_x, y => $self->velocity_y );
Please sign in to comment.
Something went wrong with that request. Please try again.