geode/loader/include/Geode/cocos/robtop/special_nodes/CCLightning.h

65 lines
1.8 KiB
C
Raw Normal View History

2024-07-11 07:45:03 -04:00
#ifndef __CCLIGHTNING_H__
#define __CCLIGHTNING_H__
#include "../../include/ccMacros.h"
#include "../../base_nodes/CCNode.h"
NS_CC_BEGIN
// @note RobTop Addition
class CCLightning : public CCNode, public CCRGBAProtocol {
public:
2024-07-24 05:34:55 -04:00
CCLightning();
virtual ~CCLightning();
2024-07-11 07:45:03 -04:00
2024-08-10 06:37:08 -04:00
static CCLightning* lightningWithStrikePoint(CCPoint strikePoint, CCPoint strikePoint2, float duration);
static CCLightning* lightningWithStrikePoint(CCPoint strikePoint);
2024-07-11 07:45:03 -04:00
2024-08-10 06:37:08 -04:00
bool initWithStrikePoint(CCPoint strikePoint, CCPoint strikePoint2, float duration);
bool initWithStrikePoint(CCPoint strikePoint);
2024-07-11 07:45:03 -04:00
2024-07-24 05:34:55 -04:00
void strike();
void strikeFinished();
2024-07-11 07:45:03 -04:00
2024-08-10 06:37:08 -04:00
void strikeRandom();
void strikeWithSeed(uint64_t seed);
2024-07-11 07:45:03 -04:00
void draw();
// cocos2d::CCRGBAProtocol
2024-07-24 05:34:55 -04:00
bool isOpacityModifyRGB();
void setOpacityModifyRGB(bool);
unsigned char getOpacity();
unsigned char getDisplayedOpacity();
void setOpacity(unsigned char);
void updateDisplayedOpacity(unsigned char);
bool isCascadeColorEnabled();
void setCascadeOpacityEnabled(bool);
2024-08-10 06:37:08 -04:00
ccColor3B const& getColor();
ccColor3B const& getDisplayedColor();
void setColor(ccColor3B const&);
void updateDisplayedColor(ccColor3B const&);
2024-07-24 05:34:55 -04:00
bool isCascadeOpacityEnabled();
void setCascadeColorEnabled(bool);
2024-07-11 07:45:03 -04:00
protected:
2024-08-10 06:37:08 -04:00
CCPoint m_strikePoint;
CCPoint m_strikePoint2;
2024-07-24 05:34:55 -04:00
bool m_split;
2024-08-10 06:37:08 -04:00
int m_displacement;
int m_minDisplacement;
2024-07-24 05:34:55 -04:00
uint64_t m_seed;
float m_lineWidth;
2024-08-10 06:37:08 -04:00
bool m_unkBool;
2024-07-24 05:34:55 -04:00
float m_duration;
float m_extraOpacity;
2024-08-10 06:37:08 -04:00
std::array<CCPoint, 200>* m_lightningPoints;
2024-07-24 05:34:55 -04:00
uint32_t m_numPoints;
uint8_t m_unk148;
uint8_t m_opacity;
2024-08-10 06:37:08 -04:00
ccColor3B m_tColor;
2024-07-11 07:45:03 -04:00
};
NS_CC_END
#endif //__CCLIGHTNING_H__