Jump to content

Actor: Difference between revisions

m
(Created page with "The Boktai games use an actor system to keep track of all "objects" currently existing in the game. Every actor has a callback that will be called every frame. Examples of actors are: Django, the camera, enemies... = Structure = Actors are defined using a pattern similar to object-oriented programming. There is a "base class", <code>Actor</code>, and "subclasses", like <code>DjangoActor</code> for example. Each subclass contains data specific to that actor type (for ex...")
 
Line 61: Line 61:
* <code>void Actor_Uninstall(Actor* actor)</code>: Removes an actor from g_ActorLists (automatically called by Actor_RunAll).
* <code>void Actor_Uninstall(Actor* actor)</code>: Removes an actor from g_ActorLists (automatically called by Actor_RunAll).


Each actor type will have a "constructor" function, which calls Actor_Create(), followed by Actor_Install(), followed by an actor-specific initialization function.
Each actor type will have a "constructor" function, which calls Actor_Create(), followed by Actor_SetCallbacks(), followed by an actor-specific initialization function.


= Actor types =
= Actor types =