| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- $#include "Scene.h"
- static const unsigned FIRST_REPLICATED_ID;
- static const unsigned LAST_REPLICATED_ID;
- static const unsigned FIRST_LOCAL_ID;
- static const unsigned LAST_LOCAL_ID;
- class Scene : public Node
- {
- Scene(Context* context);
- virtual ~Scene();
-
- tolua_outside bool SceneLoadXML @ LoadXML(File* source);
- tolua_outside bool SceneSaveXML @ SaveXML(File* dest) const;
-
- tolua_outside bool SceneLoadXML @ LoadXML(const String fileName);
- tolua_outside bool SceneSaveXML @ SaveXML(const String fileName) const;
-
- bool LoadAsync(File* file);
- bool LoadAsyncXML(File* file);
- void StopAsyncLoading();
- void Clear(bool clearReplicated = true, bool clearLocal = true);
- void SetUpdateEnabled(bool enable);
- void SetTimeScale(float scale);
- void SetElapsedTime(float time);
- void SetSmoothingConstant(float constant);
- void SetSnapThreshold(float threshold);
-
- Node* GetNode(unsigned id) const;
- //Component* GetComponent(unsigned id) const;
- bool IsUpdateEnabled() const;
- bool IsAsyncLoading() const;
- float GetAsyncProgress() const;
- const String GetFileName() const;
- unsigned GetChecksum() const;
- float GetTimeScale() const;
- float GetElapsedTime() const;
- float GetSmoothingConstant() const;
- float GetSnapThreshold() const;
- const String GetVarName(ShortStringHash hash) const;
- void Update(float timeStep);
- void BeginThreadedUpdate();
- void EndThreadedUpdate();
- void DelayedMarkedDirty(Component* component);
- bool IsThreadedUpdate() const;
- unsigned GetFreeNodeID(CreateMode mode);
- unsigned GetFreeComponentID(CreateMode mode);
- void NodeAdded(Node* node);
- void NodeRemoved(Node* node);
- void ComponentAdded(Component* component);
- void ComponentRemoved(Component* component);
- void SetVarNamesAttr(String value);
- String GetVarNamesAttr() const;
- void PrepareNetworkUpdate();
- void CleanupConnection(Connection* connection);
- void MarkNetworkUpdate(Node* node);
- void MarkNetworkUpdate(Component* component);
- void MarkReplicationDirty(Node* node);
-
- tolua_property__is_set bool updateEnabled;
- tolua_readonly tolua_property__is_set bool asyncLoading;
- tolua_readonly tolua_property__get_set float asyncProgress;
- tolua_property__get_set const String fileName;
- tolua_readonly tolua_property__get_set unsigned checksum;
- tolua_property__get_set float timeScale;
- tolua_property__get_set float elapsedTime;
- tolua_property__get_set float smoothingConstant;
- tolua_property__get_set float snapThreshold;
- tolua_readonly tolua_property__is_set bool threadedUpdate;
- tolua_property__get_set String varNamesAttr;
- };
- ${
- static bool SceneLoadXML(Scene* scene, File* file)
- {
- return file ? scene->LoadXML(*file) : false;
- }
- static bool SceneSaveXML(const Scene* scene, File* file)
- {
- return file ? scene->SaveXML(*file) : false;
- }
- static bool SceneLoadXML(Scene* scene, const String& fileName)
- {
- File file(scene->GetContext(), fileName, FILE_READ);
- if (!file.IsOpen())
- return false;
- return scene->LoadXML(file);
- }
- static bool SceneSaveXML(const Scene* scene, const String& fileName)
- {
- File file(scene->GetContext(), fileName, FILE_WRITE);
- if (!file.IsOpen())
- return false;
- return scene->SaveXML(file);
- }
- $}
|