mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Converts most of AFX classes to utilize assets
Adds modified classes to project importer convert logic
This commit is contained in:
parent
1dafb3463e
commit
64b98b0c10
15 changed files with 137 additions and 118 deletions
|
|
@ -27,6 +27,7 @@
|
|||
#define _AFX_MODEL_H_
|
||||
|
||||
#include "renderInstance/renderPassManager.h"
|
||||
#include "T3D/assets/ShapeAsset.h"
|
||||
|
||||
class ParticleEmitterData;
|
||||
class ParticleEmitter;
|
||||
|
|
@ -42,8 +43,11 @@ struct afxModelData : public GameBaseData
|
|||
{
|
||||
typedef GameBaseData Parent;
|
||||
|
||||
StringTableEntry shapeName;
|
||||
DECLARE_SHAPEASSET(afxModelData, Shape, onShapeChanged);
|
||||
DECLARE_SHAPEASSET_SETGET(afxModelData, Shape);
|
||||
|
||||
StringTableEntry sequence;
|
||||
|
||||
F32 seq_rate;
|
||||
F32 seq_offset;
|
||||
F32 alpha_mult;
|
||||
|
|
@ -63,8 +67,6 @@ struct afxModelData : public GameBaseData
|
|||
|
||||
StringTableEntry remap_txr_tags;
|
||||
|
||||
Resource<TSShape> shape;
|
||||
|
||||
bool overrideLightingOptions;
|
||||
bool receiveSunLight;
|
||||
bool receiveLMLighting;
|
||||
|
|
@ -93,6 +95,9 @@ public:
|
|||
|
||||
static void initPersistFields();
|
||||
|
||||
void onShapeChanged() {}
|
||||
void onSequenceChanged() {}
|
||||
|
||||
DECLARE_CONOBJECT(afxModelData);
|
||||
DECLARE_CATEGORY("AFX");
|
||||
};
|
||||
|
|
@ -148,9 +153,9 @@ public:
|
|||
void setSequenceRateFactor(F32 factor);
|
||||
void setSortPriority(S8 priority) { sort_priority = priority; }
|
||||
|
||||
const char* getShapeFileName() const { return mDataBlock->shapeName; }
|
||||
const char* getShapeFileName() const { return mDataBlock->getShape(); }
|
||||
void setVisibility(bool flag) { is_visible = flag; }
|
||||
TSShape* getTSShape() { return mDataBlock->shape; }
|
||||
TSShape* getTSShape() { return mDataBlock->getShapeResource(); }
|
||||
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