cleanup the header

This commit is contained in:
Oleksandr Nemesh 2024-08-10 13:37:08 +03:00 committed by GitHub
parent 94dc60a7f2
commit fca774adbf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,26 +12,17 @@ public:
CCLightning(); CCLightning();
virtual ~CCLightning(); virtual ~CCLightning();
static cocos2d::CCLightning* lightningWithStrikePoint(cocos2d::CCPoint strikePoint, cocos2d::CCPoint strikePoint2, float duration); static CCLightning* lightningWithStrikePoint(CCPoint strikePoint, CCPoint strikePoint2, float duration);
static cocos2d::CCLightning* lightningWithStrikePoint(cocos2d::CCPoint strikePoint); static CCLightning* lightningWithStrikePoint(CCPoint strikePoint);
bool initWithStrikePoint(cocos2d::CCPoint strikePoint, cocos2d::CCPoint strikePoint2, float duration); bool initWithStrikePoint(CCPoint strikePoint, CCPoint strikePoint2, float duration);
bool initWithStrikePoint(cocos2d::CCPoint strikePoint) { bool initWithStrikePoint(CCPoint strikePoint);
return initWithStrikePoint(strikePoint, {0, 0}, 0.5f);
}
void strike(); void strike();
void strikeFinished(); void strikeFinished();
void strikeRandom() { void strikeRandom();
m_seed = rand(); void strikeWithSeed(uint64_t seed);
this->strike();
}
void strikeWithSeed(uint64_t seed) {
m_seed = seed;
this->strike();
}
void draw(); void draw();
@ -44,34 +35,31 @@ public:
void updateDisplayedOpacity(unsigned char); void updateDisplayedOpacity(unsigned char);
bool isCascadeColorEnabled(); bool isCascadeColorEnabled();
void setCascadeOpacityEnabled(bool); void setCascadeOpacityEnabled(bool);
cocos2d::_ccColor3B const& getColor(); ccColor3B const& getColor();
cocos2d::_ccColor3B const& getDisplayedColor(); ccColor3B const& getDisplayedColor();
void setColor(cocos2d::_ccColor3B const&); void setColor(ccColor3B const&);
void updateDisplayedColor(cocos2d::_ccColor3B const&); void updateDisplayedColor(ccColor3B const&);
bool isCascadeOpacityEnabled(); bool isCascadeOpacityEnabled();
void setCascadeColorEnabled(bool); void setCascadeColorEnabled(bool);
protected: protected:
cocos2d::CCPoint m_strikePoint; CCPoint m_strikePoint;
cocos2d::CCPoint m_strikePoint2; CCPoint m_strikePoint2;
bool m_split; bool m_split;
PAD(7); int m_displacement;
uint32_t m_displacement; int m_minDisplacement;
uint64_t m_seed; uint64_t m_seed;
float m_lineWidth; float m_lineWidth;
PAD(4); bool m_unkBool;
float m_duration; float m_duration;
float m_extraOpacity; float m_extraOpacity;
cocos2d::CCPoint* m_lightningPoints; std::array<CCPoint, 200>* m_lightningPoints;
uint32_t m_numPoints; uint32_t m_numPoints;
uint8_t m_unk148; uint8_t m_unk148;
uint8_t m_opacity; uint8_t m_opacity;
PAD(3); ccColor3B m_tColor;
cocos2d::_ccColor3B m_tColor;
PAD(3);
}; };
NS_CC_END NS_CC_END
#endif //__CCLIGHTNING_H__ #endif //__CCLIGHTNING_H__