PageRenderTime 7ms CodeModel.GetById 2ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/lib/SDLx/Music/Data.pm

http://github.com/PerlGameDev/SDL
Perl | 37 lines | 29 code | 8 blank | 0 comment | 4 complexity | f76b0c64d2a27484d0bea358451bd157 MD5 | raw file
 1package SDLx::Music::Data;
 2
 3use strict;
 4use warnings;
 5
 6our $VERSION = 2.548;
 7
 8sub volume
 9{
10	$_[0]->{volume} = $_[1] if $_[1];
11	return $_[0]; 
12}
13
14sub file
15{
16	if( $_[1] )
17	{
18		$_[0]->{file} = $_[1];
19		$_[0]->{to_load} = 1; 
20	}
21	return $_[0]; 
22}
23
24
25sub fade_in
26{
27	$_[0]->{fade_in} = $_[1] if $_[1];
28	return $_[0]; 
29}
30
31sub loops
32{
33	$_[0]->{loops} = $_[1] if $_[1];
34	return $_[0]; 
35}
36
371;