mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +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
|
|
@ -56,7 +56,7 @@ class SFXSource;
|
|||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
// afxMagicMissileData
|
||||
|
||||
class afxMagicMissileData : public GameBaseData
|
||||
class afxMagicMissileData : public GameBaseData, protected AssetPtrCallback
|
||||
{
|
||||
typedef GameBaseData Parent;
|
||||
|
||||
|
|
@ -66,16 +66,10 @@ protected:
|
|||
public:
|
||||
enum { MaxLifetimeTicks = 4095 };
|
||||
|
||||
void onShapeChanged()
|
||||
{
|
||||
reloadOnLocalClient();
|
||||
}
|
||||
|
||||
public:
|
||||
// variables set in datablock definition:
|
||||
// Shape related
|
||||
DECLARE_SHAPEASSET(afxMagicMissileData, ProjectileShape, onShapeChanged);
|
||||
DECLARE_ASSET_SETGET(afxMagicMissileData, ProjectileShape);
|
||||
DECLARE_SHAPEASSET_REFACTOR(afxMagicMissileData, ProjectileShape)
|
||||
//StringTableEntry projectileShapeName;
|
||||
|
||||
//bool hasLight;
|
||||
|
|
@ -228,6 +222,12 @@ public:
|
|||
afxMagicMissileData* cloneAndPerformSubstitutions(const SimObject*, S32 index=0);
|
||||
bool allowSubstitutions() const override { return true; }
|
||||
void gather_cons_defs(Vector<afxConstraintDef>& defs);
|
||||
|
||||
protected:
|
||||
void onAssetRefreshed(AssetPtrBase* pAssetPtrBase) override
|
||||
{
|
||||
reloadOnLocalClient();
|
||||
}
|
||||
};
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue