.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Term::Animation::Entity 3" .TH Term::Animation::Entity 3 2024-09-01 "perl v5.40.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Term::Animation::Entity .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use Term::Animation::Entity; \& \& # Constructor \& my $entity = Term::Animation::Entity\->new( \& shape => \*(Aq;\-)\*(Aq, \& position => [ 1, 2, 3 ], \& callback_args => [ 0, 1, 0, 0 ], \& ); .Ve .SH ABSTRACT .IX Header "ABSTRACT" A sprite object for use with Term::Animation .SH DESCRIPTION .IX Header "DESCRIPTION" Term::Animation::Entity is used by Term::Animation to represent a single sprite on the screen. .SH PARAMETERS .IX Header "PARAMETERS" .Vb 2 \& name < 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 \& \& 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