看文档要看仔细,英语要加强啊... cocos2d-x 的 API 和 对应版本的 cocos2d-js 的 API 没有完全对应
| /** | |
| * Sets the X rotation (angle) of the node in degrees which performs a horizontal rotational skew. | |
| * | |
| * The difference between `setRotationalSkew()` and `setSkew()` is that the first one simulate Flash's skew functionality, | |
| * while the second one uses the real skew function. | |
| * | |
| * 0 is the default rotation angle. | |
| * Positive values rotate node clockwise, and negative values for anti-clockwise. | |
| * | |
| * @param rotationX The X rotation in degrees which performs a horizontal rotational skew. | |
| * | |
| * @warning The physics body doesn't support this. | |
| * @js setRotationX | |
| */ | |
| virtual void setRotationSkewX(float rotationX); | |
| CC_DEPRECATED_ATTRIBUTE virtual void setRotationX(float rotationX) { return setRotationSkewX(rotationX); } | |
注释没有看仔细,浪费几天的时间.... @js setRotationX----- 这句话的意思是 JS对应的版本是setRotationX,函数
说明: CC_DEPRECATED_ATTRIBUTE 表示 setRotationX 函数 在cocos2d-x 当前版本已经废弃了。 看文档要看仔细了。
浙公网安备 33010602011771号