123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- #ifndef __CC_PU_PARTICLE_3D_ON_COUNT_OBSERVER_H__
- #define __CC_PU_PARTICLE_3D_ON_COUNT_OBSERVER_H__
- #include "base/CCRef.h"
- #include "math/CCMath.h"
- #include "extensions/Particle3D/PU/CCPUObserver.h"
- #include <vector>
- #include <string>
- NS_CC_BEGIN
- struct PUParticle3D;
- class PUParticleSystem3D;
- class CC_DLL PUOnCountObserver : public PUObserver
- {
- protected:
- unsigned int _count;
- unsigned int _threshold;
- PUComparisionOperator _compare;
- public:
- static PUOnCountObserver* create();
-
- static const unsigned int DEFAULT_THRESHOLD;
- static const PUComparisionOperator DEFAULT_COMPARE;
-
- virtual void notifyStart (void) override;
-
- virtual bool observe (PUParticle3D* particle, float timeElapsed) override;
-
- unsigned int getThreshold(void) const {return _threshold;};
- void setThreshold(unsigned int threshold){_threshold = threshold;};
-
- PUComparisionOperator getCompare() const {return _compare;};
- void setCompare(PUComparisionOperator op){_compare = op;};
- virtual void copyAttributesTo (PUObserver* observer) override;
- CC_CONSTRUCTOR_ACCESS:
- PUOnCountObserver(void);
- virtual ~PUOnCountObserver(void) {};
- };
- NS_CC_END
- #endif
|