123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- #ifndef __CCTMX_OBJECT_GROUP_H__
- #define __CCTMX_OBJECT_GROUP_H__
- #include "math/CCGeometry.h"
- #include "base/CCValue.h"
- #include "base/CCRef.h"
- NS_CC_BEGIN
- class CC_DLL TMXObjectGroup : public Ref
- {
- public:
-
- TMXObjectGroup();
-
- virtual ~TMXObjectGroup();
-
-
- const std::string& getGroupName() const { return _groupName; }
-
-
- void setGroupName(const std::string& groupName) { _groupName = groupName; }
-
- Value getProperty(const std::string& propertyName) const;
-
- CC_DEPRECATED_ATTRIBUTE Value propertyNamed(const std::string& propertyName) const { return getProperty(propertyName); };
-
- ValueMap getObject(const std::string& objectName) const;
-
- CC_DEPRECATED_ATTRIBUTE ValueMap objectNamed(const std::string& objectName) const { return getObject(objectName); };
-
-
- const Vec2& getPositionOffset() const { return _positionOffset; }
-
-
- void setPositionOffset(const Vec2& offset) { _positionOffset = offset; }
-
-
- const ValueMap& getProperties() const { return _properties; }
- ValueMap& getProperties() { return _properties; }
-
-
- void setProperties(const ValueMap& properties) {
- _properties = properties;
- }
-
-
- const ValueVector& getObjects() const { return _objects; }
- ValueVector& getObjects() { return _objects; }
-
-
- void setObjects(const ValueVector& objects) {
- _objects = objects;
- }
-
- protected:
-
- std::string _groupName;
-
- Vec2 _positionOffset;
-
- ValueMap _properties;
-
- ValueVector _objects;
- };
- NS_CC_END
- #endif
|