CAnimationEvent Class Reference

Animation Event Base Class. More...

#include <animationEvent.h>

Inheritance diagram for CAnimationEvent:

CAnimationEventSound

List of all members.

Create methods

static CAnimationEventcreate (CXMLNode &node)
 CAnimationEvent ()
 CAnimationEvent (const float f)

Public Types

enum  eType { kNone, kSound }
 Type of Event. More...

Public Member Functions

virtual eType type ()
 
Returns:
The type of effect triggered

void trigPoint (const float f)
 
Parameters:
f Trigger point when this event is activated (percentage).

float trigPoint () const
 
Returns:
Trigger point when this event is activated (percentage).

virtual void run (CGameEntity *pGE) const =0
bool run (CGameEntity *pGE, const unit start, const unit end) const

Protected Attributes

float m_fPer
 Trigger point (percent in animation when triggered).


Detailed Description

Animation Event Base Class.

Animation events happen at points in the GE's animation cycle.

(c) 2007-2008 oP group Germany GbR. All rights reserved.
This source code is provided "as is" with no warranty and must not be distributed without written permission.

Author:
Doug Poston
Version:
1.3
Date:
12/28/2007

Member Enumeration Documentation

enum CAnimationEvent::eType

Type of Event.

Enumerator:
kNone  Undefined.
kSound  Entity sound (e.g. footstep, grunt, etc.).


Member Function Documentation

CAnimationEvent * CAnimationEvent::create ( CXMLNode &  node  )  [static]

Parameters:
node XML node of an animation event element.
Returns:
A pointer to the new animation event (NULL on error).

virtual void CAnimationEvent::run ( CGameEntity pGE  )  const [pure virtual]

Run event.

Parameters:
pGE Pointer to the GE that this effect if coming from.

Implemented in CAnimationEventSound.

bool CAnimationEvent::run ( CGameEntity pGE,
const unit  start,
const unit  end 
) const

Run event only if its trigger point falls between the two values passed in.

Parameters:
start Starting percent.
end Ending percent.
pGE Pointer to the GE that this effect if coming from.
Returns:
true if this event was triggered, otherwise false


The documentation for this class was generated from the following files:
Generated on Fri Dec 28 12:55:07 2007 for template7 by  doxygen 1.5.4