摘要:
如题。所以 阅读全文
摘要:
如题 阅读全文
摘要:
如题 阅读全文
摘要:
let string = '0123456';string.substring(0,3);//start: number, end?: number 012(而非 0123)string.substr(0,3);//from: number, length?: number 012 阅读全文
摘要:
使用setFlippedX后,又改变锚点为1。此时代码中坐标需要相对于cocos studio 中增加它本身的width,因为(0.5,0.5)是相对于自己中点的翻转,不变坐标。而(1,0.5)是相对于自己最右边的翻转,会改变坐标(例:最右边向右平移一个自己的width。注:即时之后setConte 阅读全文
摘要:
今天写代码,报找不到function。然后又不为空。最后发现是类型不对。因为是数组,所以不能用node.function(),而应该用nodeArr[0].function。错用前者会找不到function。干。因为这个node是用arr.splice()返回的,而我当时又不知道返回的是数组,所以就 阅读全文