/usr/share/perl5/Games/PangZero/XmasBall.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 | ##########################################################################
package Games::PangZero::XmasBall;
##########################################################################
@ISA = qw(Games::PangZero::Ball);
use strict;
use warnings;
sub SpawnChildren {
return ();
}
sub Pop {
my $self = shift;
$self->SUPER::Pop(@_);
my $bonusdrop = BonusDrop->new($self);
my @collectedSubs = ( \&OnCollectedLife, \&OnCollectedScore, \&OnCollectedScore, \&OnCollectedInvulnerability, \&OnCollectedInvulnerability );
if ($Games::PangZero::Game->Rand(2 * scalar @collectedSubs) < scalar @collectedSubs) {
$bonusdrop->{desc} = { 'srcRect' => SDL::Rect->new(0, 0, 32, 32), };
$bonusdrop->SetOnCollectedSub( $collectedSubs[int $Games::PangZero::Game->Rand(scalar @collectedSubs)] );
}
push @Games::PangZero::GameObjects, $bonusdrop;
}
sub GiveMagic {
}
sub GiveBonus {
}
sub OnCollectedLife {
my ($bonus, $guy) = @_;
$guy->{player}->{lives}++;
Games::PangZero::PlaySound('bonuslife');
}
sub OnCollectedScore {
my ($bonus, $guy) = @_;
$guy->GiveScore(50000);
Games::PangZero::PlaySound('score');
}
sub OnCollectedInvulnerability {
my ($bonus, $guy) = @_;
$guy->{invincible} = 500;
}
1;
|