GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PODS::SDLX::CONTROLLER::STATE (3)

.ds Aq ’

NAME

SDLx::Controller::State - the state of a SDLx::Controller::Interface

CONTENTS

CATEGORY

Extension, Controller

SYNOPSIS



  # youll most likely get a State object from a SDLx::Controller::Interface
  # object. Just in case, heres 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( CW$x, CW$y, CW$v_x, CW$v_y, CW$rotation, CW$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
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 PODS::SDLX::CONTROLLER::STATE (3) 2016-04-05

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.