Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

SCA_IActuator.h

Go to the documentation of this file.
00001 #ifndef __KX_IACTUATOR
00002 #define __KX_IACTUATOR
00003 
00004 #include "SCA_ILogicBrick.h"
00005 
00006 #include <vector>
00007 using namespace std;
00008 
00009 class SCA_IActuator : public SCA_ILogicBrick
00010 {
00011 protected:
00012         vector<CValue*>         m_events;
00013         void RemoveAllEvents() {
00014                 // remove event queue!
00015                 for (vector<CValue*>::iterator i=m_events.begin(); !(i==m_events.end());i++)
00016                 {
00017                         (*i)->Release();
00018                 }
00019                 m_events.clear();
00020         }
00021 public:
00022         SCA_IActuator(SCA_IObject* gameobj,PyTypeObject* T =&Type) 
00023                 :SCA_ILogicBrick(gameobj,T) {
00024                 //SetDrawColor(0xff0000ff);
00025         };
00026         virtual ~SCA_IActuator() {
00027                 RemoveAllEvents();
00028         };
00029         virtual bool Update(double curtime,double deltatime);
00030         virtual void AddEvent(CValue* event)

00031         {
00032                 m_events.push_back(event);
00033         }
00034         virtual void ProcessReplica()

00035         {
00036                 m_events.clear();
00037         }
00038         bool    IsNegativeEvent();
00039 };
00040 #endif //__KX_IACTUATOR

Generated at Thu Feb 1 13:03:09 2001 for Ketsji Game Engine by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000