mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-25 23:29:24 +00:00
initial commit
change the macro to use the refactor (exact same structure as the imageasset macro)
This commit is contained in:
parent
61a75ada1e
commit
ca1604170d
29 changed files with 700 additions and 457 deletions
|
|
@ -39,12 +39,11 @@ class TSShape;
|
|||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
// afxModel Data
|
||||
|
||||
struct afxModelData : public GameBaseData
|
||||
struct afxModelData : public GameBaseData, protected AssetPtrCallback
|
||||
{
|
||||
typedef GameBaseData Parent;
|
||||
|
||||
DECLARE_SHAPEASSET(afxModelData, Shape, onShapeChanged);
|
||||
DECLARE_ASSET_SETGET(afxModelData, Shape);
|
||||
DECLARE_SHAPEASSET_REFACTOR(afxModelData, Shape)
|
||||
|
||||
StringTableEntry sequence;
|
||||
|
||||
|
|
@ -94,13 +93,15 @@ public:
|
|||
|
||||
static void initPersistFields();
|
||||
|
||||
void onShapeChanged()
|
||||
{
|
||||
reloadOnLocalClient();
|
||||
}
|
||||
void onSequenceChanged() {}
|
||||
|
||||
DECLARE_CONOBJECT(afxModelData);
|
||||
|
||||
protected:
|
||||
void onAssetRefreshed(AssetPtrBase* pAssetPtrBase) override
|
||||
{
|
||||
reloadOnLocalClient();
|
||||
}
|
||||
};
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
|
|
@ -154,9 +155,9 @@ public:
|
|||
void setSequenceRateFactor(F32 factor);
|
||||
void setSortPriority(S8 priority) { sort_priority = priority; }
|
||||
|
||||
const char* getShapeFileName() const { return mDataBlock->getShape(); }
|
||||
const char* getShapeFileName() const { return mDataBlock->getShapeFile(); }
|
||||
void setVisibility(bool flag) { is_visible = flag; }
|
||||
TSShape* getTSShape() { return mDataBlock->getShapeResource(); }
|
||||
TSShape* getTSShape() { return mDataBlock->getShape(); }
|
||||
TSShapeInstance* getTSShapeInstance() { return shape_inst; }
|
||||
|
||||
U32 setAnimClip(const char* clip, F32 pos, F32 rate, F32 trans);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue