Skip to content
Browse files

Update for changes to SDL_Perl.

  • Loading branch information...
1 parent 31291b6 commit 0ced528e4c1d4305edc6f7c4d1757a430e2fcbb2 @jtpalmer committed Oct 3, 2010
Showing with 5 additions and 3 deletions.
  1. +2 −2 lib/Games/Maze/SDL/Controller.pm
  2. +3 −1 lib/Games/Maze/SDL/Model/Player.pm
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 );

0 comments on commit 0ced528

Please sign in to comment.
Something went wrong with that request. Please try again.