CCArray
CCArray
Cocos2DInheritance: System.Object
Constructors
CCArray(int)
CCArray(int)(System.Int32 capacity)
Allocates and initializes a new C array with specified capacity
Parameters:
capacity
(System.Int32)Example
Fields
arr(System.Int32[])
max(System.Int32)
num(System.Int32)
Methods
DoubleCapacity(CCArray)
DoubleCapacity(CCArray)(Cocos2D.CCArray arr)
Doubles C array capacity
Parameters:
arr
(Cocos2D.CCArray)Example
InsertValueAtIndex(CCArray, int, int)
InsertValueAtIndex(CCArray, int, int)(Cocos2D.CCArray arr, System.Int32 value, System.Int32 index)
Inserts a value at a certain position. The valid index is [0, num]
Parameters:
arr
(Cocos2D.CCArray)value
(System.Int32)index
(System.Int32)Example
RemoveValueAtIndex(CCArray, int)
RemoveValueAtIndex(CCArray, int)(Cocos2D.CCArray arr, System.Int32 index)
Removes value at specified index and pushes back all subsequent values. Behaviour undefined if index outside [0, num-1].
Parameters:
arr
(Cocos2D.CCArray)index
(System.Int32)Example