12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- //
- // SizeModule.h
- // cocos2d_libs
- //
- // Created by 徐俊杰 on 2020/4/24.
- //
- #ifndef SizeModule_h
- #define SizeModule_h
- //#include "cocos2d.h"
- #include "rparticle/Macros/RParticleMacros.h"
- #include "rparticle/Modules/ParticleSystemModule.h"
- #include "rparticle/ParticleSystemCurves.h"
- NS_RRP_BEGIN
- class SizeModule : public ParticleSystemModule
- {
- public:
- DECLARE_MODULE (SizeModule)
-
- SizeModule();
-
- void Update (const ParticleSystemParticles& ps, float* tempSize, size_t fromIndex, size_t toIndex);
- void UpdateSingle(const ParticleSystemParticle& particle, bool uses3DSize, float& tempSize) const;
-
- void CheckConsistency () {};
-
- inline MinMaxCurve& GetCurve() { return m_Curve; }
- inline const MinMaxCurve& GetCurve() const { return m_Curve; }
-
- template<class TransferFunction>
- void Transfer (TransferFunction& transfer);
-
- private:
- MinMaxCurve m_Curve;
- };
- NS_RRP_END
- #endif /* SizeModule_h */
|