00001
00002
00003
00004
00005 #include "SCA_IActuator.h"
00006 #include "SCA_EndObjectActuator.h"
00007 #include "SCA_IScene.h"
00008
00009
00010 #include <iostream>
00011
00012 SCA_EndObjectActuator::SCA_EndObjectActuator(SCA_IObject *gameobj, SCA_IScene* scene,PyTypeObject* T)
00013 : SCA_IActuator(gameobj, T),
00014 m_scene(scene)
00015 {
00016
00017 }
00018
00019 SCA_EndObjectActuator::~SCA_EndObjectActuator()
00020 {
00021
00022 }
00023
00024 bool SCA_EndObjectActuator::Update(double curtime,double deltatime)
00025 {
00026 bool result = false;
00027 bool bNegativeEvent = IsNegativeEvent();
00028
00029
00030
00031 if (bNegativeEvent)
00032 return false;
00033 m_scene->RemoveObject(GetParent());
00034
00035 return false;
00036 }
00037
00038
00039
00040
00041
00042 PyTypeObject SCA_EndObjectActuator::Type = {
00043 PyObject_HEAD_INIT(&PyType_Type)
00044 0,
00045 "SCA_EndObjectActuator",
00046 sizeof(SCA_EndObjectActuator),
00047 0,
00048 PyDestructor,
00049 0,
00050 __getattr,
00051 __setattr,
00052 0,
00053 __repr,
00054 0,
00055 0,
00056 0,
00057 0,
00058 0
00059 };
00060
00061 PyParentObject SCA_EndObjectActuator::Parents[] = {
00062 &SCA_EndObjectActuator::Type,
00063 &SCA_IActuator::Type,
00064 &SCA_ILogicBrick::Type,
00065 &CValue::Type,
00066 NULL
00067 };
00068
00069 PyMethodDef SCA_EndObjectActuator::Methods[] = {
00070 {NULL,NULL}
00071 };
00072
00073 PyObject*
00074 SCA_EndObjectActuator::_getattr(char* attr)
00075 {
00076 _getattr_up(SCA_IActuator);
00077 }
00078
00079