00001
00002
00003
00004
00005
00006
00007
00008 #ifndef __KX_SCENEACTUATOR
00009 #define __KX_SCENEACTUATOR
00010
00011 #include "SCA_IActuator.h"
00012
00013 class KX_SceneActuator : public SCA_IActuator
00014 {
00015 Py_Header;
00016
00017 int m_mode;
00018
00019
00020 bool m_restart;
00021
00022
00023 class KX_Scene* m_scene;
00024
00025 class KX_Camera* m_camera;
00026
00027
00028 void *findScene(char* sceneName);
00029 void *findCamera(char* cameraName);
00030
00031 public:
00032 enum SCA_SceneActuatorMode {
00033 KX_SCENE_NODEF = 0,
00034 KX_SCENE_RESTART,
00035 KX_SCENE_SET_SCENE,
00036 KX_SCENE_SET_CAMERA,
00037 KX_SCENE_MAX
00038 };
00039
00040 KX_SceneActuator(SCA_IObject* gameobj,
00041 int mode,
00042 KX_Scene* scene,
00043 KX_Camera* camera,
00044 PyTypeObject* T=&Type);
00045 virtual ~KX_SceneActuator();
00046 virtual CValue* GetReplica() {
00047 KX_SceneActuator* replica = new KX_SceneActuator(*this);
00048 replica->ProcessReplica();
00049
00050 CValue::AddDataToReplica(replica);
00051 return replica;
00052 };
00053
00054 virtual bool Update(double curtime,double deltatime);
00055
00056
00057
00058
00059
00060 virtual PyObject* _getattr(char *attr);
00061
00062
00063
00064
00065
00066 KX_PYMETHOD_DOC(KX_SceneActuator,SetUseRestart);
00067
00068 KX_PYMETHOD_DOC(KX_SceneActuator,GetUseRestart);
00069
00070 KX_PYMETHOD_DOC(KX_SceneActuator,SetScene);
00071
00072 KX_PYMETHOD_DOC(KX_SceneActuator,GetScene);
00073
00074 KX_PYMETHOD_DOC(KX_SceneActuator,SetCamera);
00075
00076 KX_PYMETHOD_DOC(KX_SceneActuator,GetCamera);
00077
00078 };
00079
00080 #endif