Browse Source

Fixed default scale.

NathanSweet 11 years ago
parent
commit
34c98688ed

+ 4 - 4
spine-cocos2dx/3/src/spine/SkeletonAnimation.h

@@ -47,8 +47,8 @@ typedef std::function<void(int trackIndex, spEvent* event)> EventListener;
 class SkeletonAnimation: public SkeletonRenderer {
 class SkeletonAnimation: public SkeletonRenderer {
 public:
 public:
 	static SkeletonAnimation* createWithData (spSkeletonData* skeletonData);
 	static SkeletonAnimation* createWithData (spSkeletonData* skeletonData);
-	static SkeletonAnimation* createWithFile (const std::string& skeletonDataFile, spAtlas* atlas, float scale = 0);
-	static SkeletonAnimation* createWithFile (const std::string& skeletonDataFile, const std::string& atlasFile, float scale = 0);
+	static SkeletonAnimation* createWithFile (const std::string& skeletonDataFile, spAtlas* atlas, float scale = 1);
+	static SkeletonAnimation* createWithFile (const std::string& skeletonDataFile, const std::string& atlasFile, float scale = 1);
 
 
 	virtual void update (float deltaTime);
 	virtual void update (float deltaTime);
 
 
@@ -79,8 +79,8 @@ public:
 protected:
 protected:
 	SkeletonAnimation ();
 	SkeletonAnimation ();
 	SkeletonAnimation (spSkeletonData* skeletonData);
 	SkeletonAnimation (spSkeletonData* skeletonData);
-	SkeletonAnimation (const std::string&skeletonDataFile, spAtlas* atlas, float scale = 0);
-	SkeletonAnimation (const std::string& skeletonDataFile, const std::string& atlasFile, float scale = 0);
+	SkeletonAnimation (const std::string&skeletonDataFile, spAtlas* atlas, float scale = 1);
+	SkeletonAnimation (const std::string& skeletonDataFile, const std::string& atlasFile, float scale = 1);
 	virtual ~SkeletonAnimation ();
 	virtual ~SkeletonAnimation ();
 	void initialize ();
 	void initialize ();
 
 

+ 4 - 4
spine-cocos2dx/3/src/spine/SkeletonRenderer.h

@@ -42,8 +42,8 @@ class PolygonBatch;
 class SkeletonRenderer: public cocos2d::Node, public cocos2d::BlendProtocol {
 class SkeletonRenderer: public cocos2d::Node, public cocos2d::BlendProtocol {
 public:
 public:
 	static SkeletonRenderer* createWithData (spSkeletonData* skeletonData, bool ownsSkeletonData = false);
 	static SkeletonRenderer* createWithData (spSkeletonData* skeletonData, bool ownsSkeletonData = false);
-	static SkeletonRenderer* createWithFile (const std::string& skeletonDataFile, spAtlas* atlas, float scale = 0);
-	static SkeletonRenderer* createWithFile (const std::string& skeletonDataFile, const std::string& atlasFile, float scale = 0);
+	static SkeletonRenderer* createWithFile (const std::string& skeletonDataFile, spAtlas* atlas, float scale = 1);
+	static SkeletonRenderer* createWithFile (const std::string& skeletonDataFile, const std::string& atlasFile, float scale = 1);
 
 
 	virtual void update (float deltaTime) override;
 	virtual void update (float deltaTime) override;
 	virtual void draw (cocos2d::Renderer* renderer, const cocos2d::Mat4& transform, uint32_t transformFlags) override;
 	virtual void draw (cocos2d::Renderer* renderer, const cocos2d::Mat4& transform, uint32_t transformFlags) override;
@@ -91,8 +91,8 @@ public:
 protected:
 protected:
 	SkeletonRenderer ();
 	SkeletonRenderer ();
 	SkeletonRenderer (spSkeletonData* skeletonData, bool ownsSkeletonData = false);
 	SkeletonRenderer (spSkeletonData* skeletonData, bool ownsSkeletonData = false);
-	SkeletonRenderer (const std::string& skeletonDataFile, spAtlas* atlas, float scale = 0);
-	SkeletonRenderer (const std::string& skeletonDataFile, const std::string& atlasFile, float scale = 0);
+	SkeletonRenderer (const std::string& skeletonDataFile, spAtlas* atlas, float scale = 1);
+	SkeletonRenderer (const std::string& skeletonDataFile, const std::string& atlasFile, float scale = 1);
 	virtual ~SkeletonRenderer ();
 	virtual ~SkeletonRenderer ();
 	void initialize ();
 	void initialize ();