12345678910111213141516171819202122232425262728293031323334353637383940 |
- //
- // 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 <string>
- 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 */
|