mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
39 lines
646 B
C++
39 lines
646 B
C++
#ifndef SPINE_SLOTDATA_H_
|
|
#define SPINE_SLOTDATA_H_
|
|
|
|
#include <string>
|
|
#include <stdexcept>
|
|
|
|
namespace spine {
|
|
|
|
class BoneData;
|
|
|
|
class SlotData {
|
|
public:
|
|
std::string name;
|
|
BoneData *boneData;
|
|
float r, g, b, a;
|
|
std::string *attachmentName;
|
|
|
|
SlotData (const std::string &name, BoneData *boneData) :
|
|
name(name),
|
|
boneData(boneData),
|
|
r(1),
|
|
g(1),
|
|
b(1),
|
|
a(1),
|
|
attachmentName(0) {
|
|
if (!boneData) throw std::invalid_argument("boneData cannot be null.");
|
|
}
|
|
|
|
~SlotData () {
|
|
if (attachmentName) {
|
|
delete attachmentName;
|
|
attachmentName = 0;
|
|
}
|
|
}
|
|
};
|
|
|
|
} /* namespace spine */
|
|
#endif /* SPINE_SLOTDATA_H_ */
|