Games-FrozenBubble
view release on metacpan or search on metacpan
bin/frozen-bubble view on Meta::CPAN
my ($destplayer, $numb) = $params =~ /(.+):(.+)/;
iter_players {
if ($pdata{$::p}{nick} eq $destplayer) {
update_malus(\&remove_image_from_background, $::p);
push @{$pdata{$::p}{malus}}, ($frame) x $numb;
update_malus(\&put_image_to_background, $::p);
}
};
} elsif ($command eq 'm') {
#- we may receive new malus bubbles after a distant player is dead already
#- ignore them instead of wrongly overlaying frozen bubbles
if ($pdata{$player}{state} eq 'ingame') {
my ($num, $cx, $cy, $sticky) = $params =~ /(.+):(.+):(.+):(.+)/;
my $b = create_bubble_given_img_num($num);
$b->{cx} = $cx;
$b->{cy} = $cy;
$b->{'stick_y'} = $sticky;
iter_players { #- need iter_players to get the small graphics change for free
if ($::p eq $player) {
calc_real_pos($b, $::p);
push @{$malus_bubble{$player}}, $b;
bin/frozen-bubble view on Meta::CPAN
#- actions (chat, joins, create)
my $y = $smg_starty;
foreach my $action (@actions) {
if ($action->{selected}) {
put_image($imgbin{highlight_server}, 6, $y-1);
}
print_($action->{readonly} ? 'netdialogs_servermsg' : 'netdialogs', $app, $smg_startx, $y, $action->{name}, 520);
$y += $smg_lineheight;
}
#- selfspot will need to properly erase selection overlay
if ($mylatitude && !$private) {
save_back_spot($mylatitude, $mylongitude, $imgbin{netspot_self}[0], \$back_selfspot);
if ($index_selfspot >= 0) {
print_spot($mylatitude, $mylongitude, 'free', $imgbin{netspot_self}[$index_selfspot], \$back_selfspot);
}
}
#- chat entry
erase_line($smg_starty_chat, $imgbin{back_netgame});
if ($curaction->() && $curaction->()->{action} eq 'CHAT') {
( run in 1.172 second using v1.01-cache-2.11-cpan-49f99fa48dc )