/usr/share/perl5/Games/PangZero/GamePause.pm is in pangzero 1.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | ##########################################################################
package Games::PangZero::GamePause;
##########################################################################
@ISA = qw(Games::PangZero::GameObject);
sub Show {
foreach my $gameObject (@Games::PangZero::GameObjects) {
return if (ref $gameObject eq 'Games::PangZero::GamePause');
}
push @Games::PangZero::GameObjects, Games::PangZero::GamePause->new();
}
sub new {
my ($class) = @_;
my $self = Games::PangZero::GameObject->new();
my $width = Games::PangZero::Graphics::TextWidth("Time left: 9.999");
%{$self} = ( %{$self},
'x' => ($Games::PangZero::PhysicalScreenWidth - $width) / 2,
'y' => 100,
'w' => $width,
'h' => 32,
);
$self->TransferRect();
bless $self, $class;
}
sub BringToFront {
my $self = shift;
@Games::PangZero::GameObjects = grep { $_ ne $self } @Games::PangZero::GameObjects;
push @Games::PangZero::GameObjects, ($self);
}
sub Advance {
my $self = shift;
if ($Games::PangZero::GamePause <= 0) {
$self->Delete;
return;
}
unless ($Games::PangZero::GameObjects[$#Games::PangZero::GameObjects] eq $self) {
$self->BringToFront();
}
}
sub Draw {
my $self = shift;
SDLx::SFont::print_text( $Games::PangZero::App, $self->{rect}->x, $self->{rect}->y, "Time left: " . ($Games::PangZero::GamePause / 100) );
}
1;
|