// // ExternalForcesModule.h // libcocos2d Mac // // Created by 徐俊杰 on 2020/4/24. // #ifndef ExternalForcesModule_h #define ExternalForcesModule_h //#include "cocos2d.h" #include "rparticle/Macros/RParticleMacros.h" #include "rparticle/Modules/ParticleSystemModule.h" NS_RRP_BEGIN class ExternalForcesModule : public ParticleSystemModule { public: DECLARE_MODULE (ExternalForcesModule) ExternalForcesModule (); void Update (const ParticleSystemReadOnlyState& roState, const ParticleSystemState& state, ParticleSystemParticles& ps, const size_t fromIndex, const size_t toIndex, float dt); void CheckConsistency() {}; static void AllocateAndCache(const ParticleSystemReadOnlyState& roState, ParticleSystemState& state); static void FreeCache(ParticleSystemState& state); template void Transfer (TransferFunction& transfer); void SetMultiplier(float multiplier) { m_Multiplier = multiplier; } float GetMultiplier() const { return m_Multiplier; } private: float m_Multiplier; }; NS_RRP_END #endif /* ExternalForcesModule_h */