ObjectAL  2.1
ObjectAL API Reference (iOS) for Kobold2D developers
OALAction Class Reference

Represents an action that can be performed on an object. More...

#include <OALAction.h>

Inheritance diagram for OALAction:

List of all members.

Public Member Functions

id initWithDuration: (float duration)
 Initialize an action.
void runWithTarget: (id target)
 Run this action on a target.
void prepareWithTarget: (id target)
 Called by runWithTraget to do any final preparations before running.
void startAction ()
 Called by runWithTarget to start the action running.
void updateCompletion: (float proportionComplete)
 Called by OALActionManager to update this action's progress.
void stopAction ()
 Stop this action.

Protected Attributes

bool runningInManager
 If TRUE, this action is running via OALActionManager.

Properties

id target
 The target to perform the action on.
float duration
 The duration of the action, in seconds.
float elapsed
 The amount of time that has elapsed for this action, in seconds.
bool running
 If true, the action is currently running.

Detailed Description

Represents an action that can be performed on an object.


Member Function Documentation

id OALAction::initWithDuration: ( float  duration) [virtual]

Initialize an action.

Parameters:
durationThe duration of this action in seconds.
Returns:
The initialized action.
void OALAction::prepareWithTarget: ( id  target) [virtual]

Called by runWithTraget to do any final preparations before running.

Subclasses must ensure that duration is valid when this method returns.

Parameters:
targetThe target to run the action on.
void OALAction::runWithTarget: ( id  target) [virtual]

Run this action on a target.

Parameters:
targetThe target to run the action on.
void OALAction::startAction ( ) [virtual]

Called by runWithTarget to start the action running.

void OALAction::stopAction ( ) [virtual]

Stop this action.

void OALAction::updateCompletion: ( float  proportionComplete) [virtual]

Called by OALActionManager to update this action's progress.

Parameters:
proportionCompleteThe proportion of this action's duration that has elapsed.

Member Data Documentation

bool OALAction::runningInManager [protected]

If TRUE, this action is running via OALActionManager.


Property Documentation

float OALAction::duration [read, assign]

The duration of the action, in seconds.

float OALAction::elapsed [read, write, assign]

The amount of time that has elapsed for this action, in seconds.

bool OALAction::running [read, assign]

If true, the action is currently running.

id OALAction::target [read, assign]

The target to perform the action on.

WEAK REFERENCE.


The documentation for this class was generated from the following files: