Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sdlx::controller::state(3pm) [debian man page]

pods::SDLx::Controller::State(3pm)			User Contributed Perl Documentation			pods::SDLx::Controller::State(3pm)

NAME
SDLx::Controller::State - the state of a SDLx::Controller::Interface CATEGORY
Extension, Controller SYNOPSIS
# you'll most likely get a State object from a SDLx::Controller::Interface # object. Just in case, here's how you would construct one by hand: my $state1 = SDLx::Controller::State->new; my $state2 = SDLx::Controller::State->new( $x, $y, $v_x, $v_y, $rotation, $ang_v ); # attributes are just simple accessors: $state->x(10); $state->x; # 10 # same goes for the rest: $state->y; $state->ang_v; # etc. DESCRIPTION
A state object is a simple container for any given state inside a running SDLx::Controller::Interface instance. METHODS
new() new( $x, $y, $v_x, $v_y, $rotation, $ang_v ) Creates a new state container object. Can optionally set the initial value of all its attributes (see below). ACCESSORS
x Accessor to get/set the x value, usually used to position the item or check for collisions. y Accessor to get/set the y value, usually used to position the item or check for collisions. v_x Accessor to get/set the x velocity of the instance, for moving objects dynamically. v_y Accessor to get/set the y velocity of the instance, for moving objects dynamically. rotation Accessor to get/set the rotation of the object, in degrees (0..360). ang_v Accessor to get/set the angular velocity, for rotating objects dynamically. AUTHORS See "AUTHORS" in SDL perl v5.14.2 2012-05-28 pods::SDLx::Controller::State(3pm)

Check Out this Related Man Page

pods::SDLx::Sound(3pm)					User Contributed Perl Documentation				    pods::SDLx::Sound(3pm)

NAME
SDLx::Sound - SDL sound extension CATEGORY
Extension SYNOPSIS
use SDLx::Sound; my $snd = SDLx::Sound->new(); # loads and plays a single sound now $snd->play('myfile.wav'); # load a single file $snd->load('theSound.aif'); # plays it or all loaded files $snd->play(); # more sounds my %files = ( channel_01 => "/my_sound1.wav", channel_02 => "/my_sound2.ogg" ); # times sounds bangs my %times = ( channel_01 => 0, # start channel_01 => 1256, # milliseconds channel_02 => 2345 ); # Load files in channels for realtime play $snd->load(%files); # sets sound channel_01 loudness $snd->loud('channel_01', 80); # loud at 80% $snd->play(%times); # play loaded files at times $snd->play; # play again # plays sound channel_01 at 578 milliseconds from now $snd->play('channel_01', 578); # fades sound $snd->fade('channel_02', 2345, 3456, -20); # in a single act do the whole Sound my $snd = SDLx::Sound->new( files => ( channel_01 => "/my_sound1.wav", channel_02 => "/my_sound2.ogg" ), loud => ( channel_01 => 80, channel_02 => 75 ), times => ( channel_01 => 0, # start channel_01 => 1256, # milliseconds channel_02 => 2345 ), fade => ( channel_02 => [2345, 3456, -20] ) )->play(); DESCRIPTION
You can think about the SDLx::Sound at 2 approaches. o A simple sound or o The sound of your game or app. Your application will say what the best approach. In a taste that resembles to perl and to SDL, our SDLx:Sound hooks at SDL::Audio and SDL::Mixer with a graceful and simple interface that can offer to monks a modern perlish way to manage sounds. An SDLx::Sound object can load sounds from filesystem, play it, adjust this loudness level or stops the sound. Each sound will play in the next available channel, so it can be handled isolately. METHODS
new Returns a new instance of SDLx::Sound load play $sdlx_sound->play('file.wav'); Play a file pause resume stop AUTHORS
See "AUTHORS" in SDL. COPYRIGHT &; LICENSE This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-05-28 pods::SDLx::Sound(3pm)
Man Page