mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
Updates ImageAsset usage to utilize AssetRef, and standardizes the setter/getter functions and naming conventions, as well as the ability to use and bind named targets.
This commit is contained in:
parent
a858d8624e
commit
34e3f78a22
82 changed files with 1451 additions and 951 deletions
|
|
@ -69,7 +69,7 @@ afxZodiacPlaneData::afxZodiacPlaneData()
|
|||
afxZodiacPlaneData::afxZodiacPlaneData(const afxZodiacPlaneData& other, bool temp_clone)
|
||||
: GameBaseData(other, temp_clone)
|
||||
{
|
||||
CLONE_ASSET_REFACTOR(Texture);
|
||||
mTextureAssetRef = other.mTextureAssetRef;
|
||||
|
||||
radius_xy = other.radius_xy;
|
||||
start_ang = other.start_ang;
|
||||
|
|
@ -110,7 +110,7 @@ EndImplementEnumType;
|
|||
void afxZodiacPlaneData::initPersistFields()
|
||||
{
|
||||
docsURL;
|
||||
INITPERSISTFIELD_IMAGEASSET(Texture, afxZodiacPlaneData, "An image to use as the zodiac's texture.");
|
||||
addField("textureAsset", TypeImageAssetRef, Offset(mTextureAssetRef, afxZodiacPlaneData), "An image asset to use as the zodiac's texture.");
|
||||
|
||||
addFieldV("radius", TypeRangedF32, myOffset(radius_xy), &CommonValidators::PositiveFloat,
|
||||
"The zodiac's radius in scene units.");
|
||||
|
|
@ -164,7 +164,7 @@ void afxZodiacPlaneData::packData(BitStream* stream)
|
|||
|
||||
merge_zflags();
|
||||
|
||||
PACKDATA_ASSET_REFACTOR(Texture);
|
||||
AssetDatabase.packDataAsset(stream, mTextureAssetRef.assetId);
|
||||
|
||||
stream->write(radius_xy);
|
||||
stream->write(start_ang);
|
||||
|
|
@ -183,7 +183,7 @@ void afxZodiacPlaneData::unpackData(BitStream* stream)
|
|||
{
|
||||
Parent::unpackData(stream);
|
||||
|
||||
UNPACKDATA_ASSET_REFACTOR(Texture);
|
||||
mTextureAssetRef = AssetDatabase.unpackDataAsset(stream);
|
||||
|
||||
stream->read(&radius_xy);
|
||||
stream->read(&start_ang);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue