NAME
Games::Irrlicht::Thingy - base class for event handlers, timers etc
SYNOPSIS
package Games::Irrlicht::MyThingy;
use Games::Irrlicht::Thingy;
require Exporter;
@ISA = qw/Games::Irrlicht::Thingy/;
sub _init
{
my ($self) = shift;
# init with arguments from @_
}
# override or add any method you need
EXPORTS
Exports nothing on default.
DESCRIPTION
This package provides a base class for "things" in Games::Irrlicht. It should not be used on it's own.
METHODS
These methods need not to be overwritten:
- new()
-
my $thingy = Games::Irrlicht::Thingy->new($app,@options);
Creates a new thing, and registers it with the application $app (usually an instance of a subclass of Games::Irrlicht).
- is_active()
-
$thingy->is_active();
Returns true if the thingy is active, or false for inactive.
- activate()
-
$thingy->activate();
Set the thingy to active. Newly created ones are always active.
- deactivate()
-
$thingy->deactivate();
Set the thingy to inactive. Newly created ones are always active.
Inactive thingies ignore signals or state changes until they become active again.
- id()
-
Return the thingy's unique id.
- name()
-
print $thingy->name(); $thingy->name('new name');
Set and/or return the thingy's name. The default name is the last part of the classname, uppercased, preceded by '#' and the thingy's unique id.
AUTHORS
(c) 2002, 2003, 2004, Tels <http://bloodgate.com/>