Help for this page

Select Code to Download


  1. or download this
    sub handle_fire {
        my ($new, $x, $y) = @_;
    ...
            $i++;    
        }
    }
    
  2. or download this
        #draw gunshots, possibly add new one
        handle_fire( $fire, $x, $y );
    
  3. or download this
        #draw gunshots, possibly add new one
        $fire_items = handle_fire( $fire, $x, $y, $fire_items );
    
  4. or download this
    my $fire_items;
        .
    ...
            .
            .
    }
    
  5. or download this
    sub handle_fire {
        my ( $new, $x, $y ) = @_;
    ...
            $i++;
        }
    }
    
  6. or download this
    sub handle_fire {
        my ( $new, $x, $y, $fire_items ) = @_;
    ...
        }
        return $fire_items;
    }
    
  7. or download this
        if ( $new ){
            push(@$fire_items, $x.' '.$y);
        }
    
  8. or download this
        if ( $new ){
            push @$fire_items, [$x, $y];
        }
    
  9. or download this
        push @$fire_items, [$x, $y] if $new;
    
  10. or download this
            my ( $xc, $yc ) = split(' ', $$fire_items[$i] );
    
  11. or download this
            my ( $xc, $yc ) = @{ $fire_items[$i] };
    
  12. or download this
            $$fire_items[$i] = join(' ', $xc + 10, $yc );
    
  13. or download this
            $$fire_items[$i] = [$xc + 10, $yc];
    
  14. or download this
        unless ( $xc < $app->width + $images{beam1}->width ) {
            splice( @$fire_items, $i, 1 );
            next;
        }
    
  15. or download this
    sub handle_fire {
        my ( $new, $x, $y, $fire_items ) = @_;
    ...
        push @temp, [$x, $y] if $new;
        return \@temp;
    }
    
  16. or download this
    sub handle_fire {
        my ( $new, $x, $y, $fire_items ) = @_;
    ...
        push @temp, [$x, $y] if $new;
        return \@temp;
    }