mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-10 22:24:33 +00:00
Expands ScriptAsset behavior to operate as a generic type-settable asset
This commit is contained in:
parent
b6f3c25fea
commit
167f98b767
6 changed files with 50 additions and 4 deletions
|
|
@ -52,7 +52,7 @@ class ScriptAsset : public AssetBase
|
|||
StringTableEntry mScriptPath;
|
||||
bool mIsServerSide;
|
||||
|
||||
Vector<AssetPtr<ScriptAsset>> mScriptAssets;
|
||||
Vector<AssetPtr<ScriptAsset>> mScriptAssetDependencies;
|
||||
|
||||
public:
|
||||
ScriptAsset();
|
||||
|
|
@ -72,9 +72,14 @@ public:
|
|||
|
||||
bool execScript();
|
||||
|
||||
DECLARE_CALLBACK(void, onInitializeAsset, ());
|
||||
DECLARE_CALLBACK(void, onRefreshAsset, ());
|
||||
DECLARE_CALLBACK(void, onUnloadAsset, ());
|
||||
|
||||
protected:
|
||||
virtual void initializeAsset(void);
|
||||
virtual void onAssetRefresh(void);
|
||||
virtual void unloadAsset(void);
|
||||
|
||||
static bool setScriptFile(void *obj, const char *index, const char *data) { static_cast<ScriptAsset*>(obj)->setScriptFile(data); return false; }
|
||||
static const char* getScriptFile(void* obj, const char* data) { return static_cast<ScriptAsset*>(obj)->getScriptFile(); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue