mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
Updated handling of subscenes in assets to be it's own distinct definition to avoid parsing and detection issues, as well as fields to be handled distinctly between the types
This commit is contained in:
parent
c2af4e578b
commit
5566f8a396
9 changed files with 469 additions and 47 deletions
|
|
@ -5,8 +5,8 @@
|
|||
#ifndef SCENE_GROUP_H
|
||||
#include "SceneGroup.h"
|
||||
#endif
|
||||
#ifndef LEVEL_ASSET_H
|
||||
#include "assets/LevelAsset.h"
|
||||
#ifndef SUBSCENE_ASSET_H
|
||||
#include "assets/SubSceneAsset.h"
|
||||
#endif
|
||||
|
||||
class GameMode;
|
||||
|
|
@ -21,13 +21,13 @@ public:
|
|||
NextFreeMask = Parent::NextFreeMask << 0
|
||||
};
|
||||
|
||||
void onLevelChanged() {}
|
||||
void onSubSceneChanged() {}
|
||||
|
||||
protected:
|
||||
static bool smTransformChildren;
|
||||
|
||||
private:
|
||||
DECLARE_LEVELASSET(SubScene, Level, onLevelChanged);
|
||||
DECLARE_SUBSCENEASSET(SubScene, SubScene, onSubSceneChanged);
|
||||
|
||||
StringTableEntry mGameModesNames;
|
||||
Vector<GameMode*> mGameModesList;
|
||||
|
|
@ -61,7 +61,7 @@ public:
|
|||
|
||||
static void initPersistFields();
|
||||
static void consoleInit();
|
||||
StringTableEntry getTypeHint() const override { return (getLevelAsset()) ? getLevelAsset()->getAssetName() : StringTable->EmptyString(); }
|
||||
StringTableEntry getTypeHint() const override { return (getSubSceneAsset()) ? getSubSceneAsset()->getAssetName() : StringTable->EmptyString(); }
|
||||
|
||||
// SimObject
|
||||
bool onAdd() override;
|
||||
|
|
@ -122,6 +122,6 @@ public:
|
|||
|
||||
DECLARE_CALLBACK(void, onLoaded, ());
|
||||
DECLARE_CALLBACK(void, onUnloaded, ());
|
||||
DECLARE_ASSET_SETGET(SubScene, Level);
|
||||
DECLARE_ASSET_SETGET(SubScene, SubScene);
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue