All Data Structures Files Functions Variables Enumerations Enumerator Properties Defines
Public Member Functions | Protected Attributes | Properties
Lemming Class Reference

#import <Lemming.h>

Inheritance diagram for Lemming:
GameObject CogitoAgent DecisionTreeAgent QLearningAgent ShortestRouteAgent

Public Member Functions

(void) - changeState:
(void) - changeState:afterDelay:
(void) - changeDirection
(void) - takePath:
(int) - respawns
(void) - onObjectCollision:
(void) - onEndConditionReached
(void) - updateDebugLabel

Protected Attributes

int respawns
int fallCounter
CCSpriteFrame * standingFrame
Direction movementDirection
GameObjectType objectLastCollidedWith
BOOL isUsingHelmet
BOOL isUsingUmbrella
BOOL umbrellaEquipped
int umbrellaTimer
int spawnTime
int actionsTaken

Properties

int health
CharacterStates state
int helmetUses
int umbrellaUses
CCAnimation * idleAnim
CCAnimation * idleHelmetAnim
CCAnimation * walkingAnim
CCAnimation * walkingHelmetAnim
CCAnimation * openUmbrellaAnim
CCAnimation * floatUmbrellaAnim
CCAnimation * deathAnim
int ID
CCLabelBMFont * debugLabel

Detailed Description

Definition at line 16 of file Lemming.h.


Member Function Documentation

- (void) changeDirection

Changes the direction of the lemming

Definition at line 269 of file Lemming.m.

- (void) changeState: (CharacterStates _newState

Changes the current state

Parameters:
stateto change to

Reimplemented from GameObject.

Definition at line 129 of file Lemming.m.

- (void) changeState: (CharacterStates _newState
afterDelay: (float)  _delay 

Changes the current state after a delay

Parameters:
stateto change to
amountto delay by in seconds

Definition at line 203 of file Lemming.m.

Lemming has either died, or won act accordingly

Definition at line 291 of file Lemming.m.

- (void) onObjectCollision: (GameObject*)  _object

Applies the appropriate action when a Lemming collides with an object

Parameters:
objectcollided with

Definition at line 426 of file Lemming.m.

- (int) respawns
- (void) takePath: (Action _action

Changes the lemming's action

Parameters:
theaction to take

Definition at line 219 of file Lemming.m.

- (void) updateDebugLabel

Updates the debug string

Definition at line 514 of file Lemming.m.


Field Documentation

- (int) actionsTaken [protected]

Definition at line 36 of file Lemming.h.

- (int) fallCounter [protected]

Definition at line 21 of file Lemming.h.

- (BOOL) isUsingHelmet [protected]

Definition at line 27 of file Lemming.h.

- (BOOL) isUsingUmbrella [protected]

Definition at line 30 of file Lemming.h.

- (Direction) movementDirection [protected]

Definition at line 24 of file Lemming.h.

Definition at line 25 of file Lemming.h.

- (int) respawns [protected]

Returns the number of respawns left

Definition at line 20 of file Lemming.h.

- (int) spawnTime [protected]

Definition at line 35 of file Lemming.h.

- (CCSpriteFrame*) standingFrame [protected]

Definition at line 22 of file Lemming.h.

- (BOOL) umbrellaEquipped [protected]

Definition at line 31 of file Lemming.h.

- (int) umbrellaTimer [protected]

Definition at line 33 of file Lemming.h.


Property Documentation

- (CCAnimation *) deathAnim [read, write, retain]

Definition at line 44 of file Lemming.h.

- (CCLabelBMFont *) debugLabel [read, write, retain]

Definition at line 48 of file Lemming.h.

- (CCAnimation *) floatUmbrellaAnim [read, write, retain]

Definition at line 43 of file Lemming.h.

- (int) health [read, write, assign]

Definition at line 19 of file Lemming.h.

- (int) helmetUses [read, write, assign]

Definition at line 28 of file Lemming.h.

- (int) ID [read, write, assign]

Definition at line 47 of file Lemming.h.

- (CCAnimation *) idleAnim [read, write, retain]

Definition at line 38 of file Lemming.h.

- (CCAnimation *) idleHelmetAnim [read, write, retain]

Definition at line 39 of file Lemming.h.

- (CCAnimation *) openUmbrellaAnim [read, write, retain]

Definition at line 42 of file Lemming.h.

- (CharacterStates) state [read, write, assign]

Definition at line 23 of file Lemming.h.

- (int) umbrellaUses [read, write, assign]

Definition at line 32 of file Lemming.h.

- (CCAnimation *) walkingAnim [read, write, retain]

Definition at line 40 of file Lemming.h.

- (CCAnimation *) walkingHelmetAnim [read, write, retain]

Definition at line 41 of file Lemming.h.


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