![]() |
![]()
| ![]() |
![]()
NAMETerm::Animation::Entity SYNOPSISuse Term::Animation::Entity; # Constructor my $entity = Term::Animation::Entity->new( shape => ';-)', position => [ 1, 2, 3 ], callback_args => [ 0, 1, 0, 0 ], ); ABSTRACTA sprite object for use with Term::Animation DESCRIPTIONTerm::Animation::Entity is used by Term::Animation to represent a single sprite on the screen. PARAMETERSname < SCALAR > A string uniquely identifying this object shape < REF > The ASCII art for this object. It can be provided as: 1) A single multi-line text string (no animation) 2) An array of multi-line text strings, where each element is a single animation frame 3) An array of 2D arrays. Each element in the outer array is a single animation frame. If you provide an array, each element is a single frame of animation. If you provide either 1) or 2), a single newline will be stripped off of the beginning of each string. 3) is what the module uses internally. auto_trans < BOOLEAN > Whether to automatically make whitespace at the beginning of each line transparent. Default: 0 position < ARRAY_REF > A list specifying initial x,y and z coordinates Default: [ 0, 0, 0 ] callback < SUBROUTINE_REF > Callback routine for this entity. Default: I<move_entity()> callback_args < REF > Arguments to the callback routine. curr_frame < INTEGER > Animation frame to begin with. Default: 0 wrap < BOOLEAN > Whether this entity should wrap around the edge of the screen. Default: 0 transparent < SCALAR > Character used to indicate transparency. Default: ? die_offscreen < BOOLEAN > Whether this entity should be killed if it goes off the screen. Default: 0 die_entity < ENTITY > Specifies an entity (ref or name). When the named entity dies, this entity should die as well. Default: undef die_time < INTEGER > The time at which this entity should be killed. This should be a UNIX epoch time, as returned by I<time>. Default: undef die_frame < INTEGER > Specifies the number of frames that should be displayed before this entity is killed. Default: undef death_cb < SUBROUTINE_REF > Callback routine used when this entity dies dcb_args < REF > Arguments to the entity death callback routine color Color mask. This follows the same format as 'shape'. See the 'COLOR' section below for more details. default_color < SCALAR > A default color to use for the entity. See the 'COLOR' section for more details. data < REF > Store some data about this entity. It is not used by the module. You can use it to store state information about this entity. METHODS
AUTHORKirk Baucom <kbaucom@schizoid.com> SEE ALSOTerm::Animation POD ERRORSHey! The above document had some coding errors, which are explained below:
|