// // CustomPropertyModel.h // cocos2d // // Created by ZhengSong on 2022/7/21. // #ifndef CustomPropertyModel_h #define CustomPropertyModel_h #include "base/CCRef.h" #include "base/CCValue.h" #include NS_CC_BEGIN class CustomPropertyModel : public Ref{ public: virtual bool init(); CustomPropertyModel(); Value code(); void decode(const Value&); bool isUseDefault(); void setIsUseDefault(bool isUse); int getType(); void setType(int type); const Value& getValue(); void setValue(const Value& value); const std::string& getName(); void setName(const std::string& name); private: bool _isUseDefault; // 默认为true int _type; Value _value; std::string _name; }; NS_CC_END #endif /* CustomPropertyModel_h */