Mario Zechner hai 1 ano
pai
achega
34387d48d4

+ 9 - 9
spine-cocos2dx/example/Classes/PhysicsExample.cpp

@@ -53,21 +53,21 @@ bool PhysicsExample::init() {
 
 	// Next we setup a listener that receives and stores
 	// the current mouse location and updates the skeleton position
-    // accordingly.
+	// accordingly.
 	EventListenerMouse *mouseListener = EventListenerMouse::create();
 	mouseListener->onMouseMove = [this](cocos2d::Event *event) -> void {
 		// convert the mosue location to the skeleton's coordinate space
 		// and store it.
 		EventMouse *mouseEvent = dynamic_cast<EventMouse *>(event);
 		Vec2 mousePosition = skeletonNode->convertToNodeSpace(mouseEvent->getLocationInView());
-        if (firstUpdate) {
-            firstUpdate = false;
-            lastMousePosition = mousePosition;
-            return;
-        }
-        Vec2 delta = mousePosition - lastMousePosition;
-        skeletonNode->getSkeleton()->physicsTranslate(-delta.x, -delta.y);
-        lastMousePosition = mousePosition;
+		if (firstUpdate) {
+			firstUpdate = false;
+			lastMousePosition = mousePosition;
+			return;
+		}
+		Vec2 delta = mousePosition - lastMousePosition;
+		skeletonNode->getSkeleton()->physicsTranslate(-delta.x, -delta.y);
+		lastMousePosition = mousePosition;
 	};
 	_eventDispatcher->addEventListenerWithSceneGraphPriority(mouseListener, this);
 

+ 1 - 1
spine-cocos2dx/example/Classes/PhysicsExample.h

@@ -45,7 +45,7 @@ public:
 
 private:
 	spine::SkeletonAnimation *skeletonNode;
-    bool firstUpdate = true;
+	bool firstUpdate = true;
 	cocos2d::Vec2 lastMousePosition;
 };
 

+ 1 - 1
spine-cpp/spine-cpp/src/spine/Atlas.cpp

@@ -192,7 +192,7 @@ struct AtlasInput {
 		line.end = index;
 		if (index != end) index++;
 		line = line.trim();
-		line.length = (int)(end - start);
+		line.length = (int) (end - start);
 		return &line;
 	}
 

+ 1 - 1
spine-cpp/spine-cpp/src/spine/SkeletonJson.cpp

@@ -1164,7 +1164,7 @@ Animation *SkeletonJson::readAnimation(Json *root, SkeletonData *skeletonData) {
 				timelines.add(readTimeline(timelineMap->_child, timeline, 0, 1));
 			} else if (strcmp(timelineMap->_name, "inherit") == 0) {
 				InheritTimeline *timeline = new (__FILE__, __LINE__) InheritTimeline(frames, boneIndex);
-                keyMap = timelineMap->_child;
+				keyMap = timelineMap->_child;
 				for (frame = 0;; frame++) {
 					float time = Json::getFloat(keyMap, "time", 0);
 					const char *value = Json::getString(keyMap, "value", "normal");