3 <h3 id="TOP">Index</h3>
5 <ul><li><a href="#NAME">NAME</a></li>
6 <li><a href="#CATEGORY">CATEGORY</a></li>
7 <li><a href="#SYNOPSIS">SYNOPSIS</a></li>
8 <li><a href="#DESCRIPTION">DESCRIPTION</a></li>
9 <li><a href="#METHODS">METHODS</a>
10 <ul><li><a href="#new">new()</a></li>
11 <li><a href="#new_x_y_v_x_v_y_rotation_ang_v">new( $x, $y, $v_x, $v_y, $rotation, $ang_v )</a></li>
14 <li><a href="#ACCESSORS">ACCESSORS</a>
15 <ul><li><a href="#x">x</a></li>
16 <li><a href="#y">y</a></li>
17 <li><a href="#v_x">v_x</a></li>
18 <li><a href="#v_y">v_y</a></li>
19 <li><a href="#rotation">rotation</a></li>
20 <li><a href="#ang_v">ang_v</a></li>
21 <li><a href="#AUTHORS">AUTHORS</a>
28 <h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
29 <div id="NAME_CONTENT">
30 <p>SDLx::Controller::State - the state of a SDLx::Controller::Interface</p>
33 <h1 id="CATEGORY">CATEGORY</h1><p><a href="#TOP" class="toplink">Top</a></p>
34 <div id="CATEGORY_CONTENT">
35 <p>Extension, Controller</p>
38 <h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
39 <div id="SYNOPSIS_CONTENT">
40 <pre> # you'll most likely get a State object from a SDLx::Controller::Interface
41 # object. Just in case, here's how you would construct one by hand:
42 my $state1 = SDLx::Controller::State->new;
43 my $state2 = SDLx::Controller::State->new( $x, $y, $v_x, $v_y, $rotation, $ang_v );
45 # attributes are just simple accessors:
49 # same goes for the rest:
58 <h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
59 <div id="DESCRIPTION_CONTENT">
60 <p>A state object is a simple container for any given state inside a running
61 <a href="SDLx-Controller-Interface.html">SDLx::Controller::Interface</a> instance.</p>
64 <h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
65 <div id="METHODS_CONTENT">
68 <h2 id="new">new()</h2>
69 <div id="new_CONTENT">
72 <h2 id="new_x_y_v_x_v_y_rotation_ang_v">new( $x, $y, $v_x, $v_y, $rotation, $ang_v )</h2>
73 <div id="new_x_y_v_x_v_y_rotation_ang_v_CONTE">
74 <p>Creates a new state container object. Can optionally set the initial value
75 of all its attributes (see below).</p>
78 <h1 id="ACCESSORS">ACCESSORS</h1><p><a href="#TOP" class="toplink">Top</a></p>
79 <div id="ACCESSORS_CONTENT">
84 <p>Accessor to get/set the x value, usually used to position the item or check for collisions.</p>
89 <p>Accessor to get/set the y value, usually used to position the item or check for collisions.</p>
93 <div id="v_x_CONTENT">
94 <p>Accessor to get/set the x velocity of the instance, for moving objects dynamically.</p>
98 <div id="v_y_CONTENT">
99 <p>Accessor to get/set the y velocity of the instance, for moving objects dynamically.</p>
102 <h2 id="rotation">rotation</h2>
103 <div id="rotation_CONTENT">
104 <p>Accessor to get/set the rotation of the object, in degrees (0..360).</p>
107 <h2 id="ang_v">ang_v</h2>
108 <div id="ang_v_CONTENT">
109 <p>Accessor to get/set the angular velocity, for rotating objects dynamically.</p>
112 <h2 id="AUTHORS">AUTHORS</h2>
113 <div id="AUTHORS_CONTENT">
114 <p>See <a href="/SDL.html#AUTHORS">/SDL.html#AUTHORS</a></p>