Files
Webcam/include/engine/scene3d/scene_script_unit.h
2026-06-22 11:49:35 +02:00

57 lines
1.1 KiB
C++

/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#ifndef __SCENESCRIPTUNIT__
#define __SCENESCRIPTUNIT__
#include "script/script_unit.h"
#include "script/script_object.h"
#include "memory/nauto_ptr.h"
namespace GS {
namespace S3D {
/*!
@short Scene script unit.
@author Emmanuel Julien (ejulien@gsworks.fr)
*/
class SceneScriptUnit : public Script::Unit
{
int suspend_update;
public:
AutoPtr <Script::Object>
render_callback,
render_done_callback,
render_user_callback,
render_ui_done_callback,
physic_step_callback,
update_callback;
/// Update and return the state of the suspend flag.
bool IsSuspended(int dt);
/*!
@short Suspend update calls for a given duration.
Resume updates by passing a zero delay.
*/
void SuspendUpdate(int ms = 0);
bool Open();
void Close();
SceneScriptUnit(Script::IVM *);
~SceneScriptUnit();
};
} // S3D
} //GS
#endif // __SCENESCRIPTUNIT__