// Copyright (C) 2010-2012 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h #include "CParticleScaleAffector.h" #include "IAttributes.h" namespace irr { namespace scene { CParticleScaleAffector::CParticleScaleAffector(const core::dimension2df& scaleTo) : ScaleTo(scaleTo) { #ifdef _DEBUG setDebugName("CParticleScaleAffector"); #endif } void CParticleScaleAffector::affect (u32 now, SParticle *particlearray, u32 count) { for(u32 i=0;iaddFloat("ScaleToWidth", ScaleTo.Width); out->addFloat("ScaleToHeight", ScaleTo.Height); } void CParticleScaleAffector::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) { ScaleTo.Width = in->getAttributeAsFloat("ScaleToWidth"); ScaleTo.Height = in->getAttributeAsFloat("ScaleToHeight"); } E_PARTICLE_AFFECTOR_TYPE CParticleScaleAffector::getType() const { return scene::EPAT_SCALE; } } }