array 类型
索引
方法
removeAtRemoves the array item at the specified index.fastRemoveAtRemoves the array item at the specified index....removeRemoves the first occurrence of a specific object from the array.fastRemoveRemoves the first occurrence of a specific object from the array....verifyTypeVerify array's TyperemoveArrayRemoves from array all values in minusArr. For each Value in minusArr, the first matching instance in array will be removed.appendObjectsAtInserts some objects at indexcontainsDetermines whether the array contains a specific value.copyCopy an array's item to a new array (its performance is better than Array.slice)
Details
方法
removeAt
Removes the array item at the specified index.
| meta | description |
|---|---|
| 定义于 | cocos2d/core/platform/js.js:703 |
参数列表
arrayAnyindexNumber
fastRemoveAt
Removes the array item at the specified index. It's faster but the order of the array will be changed.
| meta | description |
|---|---|
| 定义于 | cocos2d/core/platform/js.js:713 |
参数列表
arrayAnyindexNumber
remove
Removes the first occurrence of a specific object from the array.
| meta | description |
|---|---|
| 返回 | Boolean |
| 定义于 | cocos2d/core/platform/js.js:729 |
参数列表
arrayAnyvalueAny
fastRemove
Removes the first occurrence of a specific object from the array. It's faster but the order of the array will be changed.
| meta | description |
|---|---|
| 定义于 | cocos2d/core/platform/js.js:747 |
参数列表
arrayAnyvalueNumber
verifyType
Verify array's Type
| meta | description |
|---|---|
| 返回 | Boolean |
| 定义于 | cocos2d/core/platform/js.js:762 |
参数列表
removeArray
Removes from array all values in minusArr. For each Value in minusArr, the first matching instance in array will be removed.
| meta | description |
|---|---|
| 定义于 | cocos2d/core/platform/js.js:781 |
参数列表
appendObjectsAt
Inserts some objects at index
| meta | description |
|---|---|
| 返回 | Array |
| 定义于 | cocos2d/core/platform/js.js:793 |
参数列表
contains
Determines whether the array contains a specific value.
| meta | description |
|---|---|
| 返回 | Boolean |
| 定义于 | cocos2d/core/platform/js.js:806 |
参数列表
arrayAnyvalueAny
copy
Copy an array's item to a new array (its performance is better than Array.slice)
| meta | description |
|---|---|
| 返回 | Array |
| 定义于 | cocos2d/core/platform/js.js:817 |
参数列表
arrayArray