Typed wrapper around Godot’s Array class, an array of
annotated, Variant typed elements allocated in the engine in C++.
Useful when interfacing with the engine. Otherwise prefer .NET collections
such as arrays or .
Constructors
Array__ScheduleTask.__new()
Constructs a new empty .
Array__ScheduleTask.__new()
Array__ScheduleTask.__new(IEnumerable__ScheduleTask)
Array__ScheduleTask.__new(collection: IEnumerable__ScheduleTask)
| Type |
Name |
Description |
| IEnumerable__ScheduleTask |
collection |
|
Array__ScheduleTask.__new(ScheduleTask[])
Array__ScheduleTask.__new(array: ScheduleTask[])
| Type |
Name |
Description |
| ScheduleTask[] |
array |
|
Array__ScheduleTask.__new(Array)
Constructs a typed from an untyped .
Array__ScheduleTask.__new(array: Array)
| Type |
Name |
Description |
| Array |
array |
The untyped array to construct from. |
ReadOnly
| Type |
Name |
Static |
Default |
Description |
| number |
Count |
|
|
Returns the number of elements in this . This is also known as the size or length of the array. |
| boolean |
IsReadOnly |
|
|
Returns if the array is read-only. See . |
Properties
| Type |
Getter |
Setter |
Static |
Default |
Description |
| ScheduleTask |
get_Item() |
set_Item(val) |
|
|
|
Functions
Requires an instance!
Duplicate(boolean)
Duplicates this .
Duplicate(deep: boolean = False) -> Array__ScheduleTask
| Type |
Name |
Description |
| boolean |
deep |
If , performs a deep copy. |
Fill(ScheduleTask)
Fill(value: ScheduleTask) -> nil
| Type |
Name |
Description |
| ScheduleTask |
value |
|
Max
Returns the maximum value contained in the array if all elements are of comparable types. If the elements can’t be compared, is returned.
Min
Returns the minimum value contained in the array if all elements are of comparable types. If the elements can’t be compared, is returned.
PickRandom
Returns a random value from the target array.
PickRandom() -> ScheduleTask
RecursiveEqual(Array__ScheduleTask)
Compares this against the recursively. Returns if the sizes and contents of the arrays are equal, otherwise.
RecursiveEqual(other: Array__ScheduleTask) -> boolean
| Type |
Name |
Description |
| Array__ScheduleTask |
other |
The other array to compare against. |
Resize(number)
Resizes this to the given size.
Resize(newSize: number) -> Error
| Type |
Name |
Description |
| number |
newSize |
The new size of the array. |
Reverse
Reverses the order of the elements in the array.
Shuffle
Shuffles the array such that the items will have a random order. This method uses the global random number generator common to methods such as . Call to ensure that a new seed will be used each time if you want non-reproducible shuffling.
Slice(number)
Creates a shallow copy of a range of elements in the source .
Slice(start: number) -> Array__ScheduleTask
| Type |
Name |
Description |
| number |
start |
The zero-based index at which the range starts. |
Slice(number,number)
Creates a shallow copy of a range of elements in the source .
Slice(start: number,length: number) -> Array__ScheduleTask
| Type |
Name |
Description |
| number |
start |
The zero-based index at which the range starts. |
| number |
length |
The length of the range. |
GetSliceRange(number,number,number,boolean)
Returns the slice of the , from (inclusive) to (exclusive), as a new . The absolute value of and will be clamped to the array size. If either or are negative, they will be relative to the end of the array (i.e. arr.GetSliceRange(0, -2) is a shorthand for arr.GetSliceRange(0, arr.Count - 2)). If specified, is the relative index between source elements. It can be negative, then must be higher than . For example, [0, 1, 2, 3, 4, 5].GetSliceRange(5, 1, -2) returns [5, 3]. If is true, each element will be copied by value rather than by reference.
GetSliceRange(start: number,end: number,step: number = 1,deep: boolean = False) -> Array__ScheduleTask
| Type |
Name |
Description |
| number |
start |
The zero-based index at which the range starts. |
| number |
end |
The zero-based index at which the range ends. |
| number |
step |
The relative index between source elements to take. |
| boolean |
deep |
If , performs a deep copy. |
Sort
Sorts the array. Note: The sorting algorithm used is not stable. This means that values considered equal may have their order changed when using . Note: Strings are sorted in alphabetical order (as opposed to natural order). This may lead to unexpected behavior when sorting an array of strings ending with a sequence of numbers. To sort with a custom predicate use .
IndexOf(ScheduleTask)
IndexOf(item: ScheduleTask) -> number
| Type |
Name |
Description |
| ScheduleTask |
item |
|
IndexOf(ScheduleTask,number)
IndexOf(item: ScheduleTask,index: number) -> number
| Type |
Name |
Description |
| ScheduleTask |
item |
|
| number |
index |
|
LastIndexOf(Variant)
Searches the array for a value in reverse order and returns its index or -1 if not found.
LastIndexOf(item: Variant) -> number
| Type |
Name |
Description |
| Variant |
item |
The item to search for. |
LastIndexOf(Variant,number)
Searches the array for a value in reverse order and returns its index or -1 if not found.
LastIndexOf(item: Variant,index: number) -> number
| Type |
Name |
Description |
| Variant |
item |
The item to search for. |
| number |
index |
The initial search index to start from. |
Insert(number,ScheduleTask)
Insert(index: number,item: ScheduleTask) -> nil
| Type |
Name |
Description |
| number |
index |
|
| ScheduleTask |
item |
|
RemoveAt(number)
Removes an element from the array by index. To remove an element by searching for its value, use instead.
RemoveAt(index: number) -> nil
| Type |
Name |
Description |
| number |
index |
The index of the element to remove. |
MakeReadOnly
Makes the read-only, i.e. disabled modying of the array’s elements. Does not apply to nested content, e.g. content of nested arrays.
Add(ScheduleTask)
Add(item: ScheduleTask) -> nil
| Type |
Name |
Description |
| ScheduleTask |
item |
|
AddRange(IEnumerable__ScheduleTask)
Adds the elements of the specified collection to the end of this .
AddRange(collection: IEnumerable__ScheduleTask) -> nil
| Type |
Name |
Description |
| IEnumerable__ScheduleTask |
collection |
Collection of items to add. |
BinarySearch(number,number,ScheduleTask)
BinarySearch(index: number,count: number,item: ScheduleTask) -> number
| Type |
Name |
Description |
| number |
index |
|
| number |
count |
|
| ScheduleTask |
item |
|
BinarySearch(ScheduleTask)
BinarySearch(item: ScheduleTask) -> number
| Type |
Name |
Description |
| ScheduleTask |
item |
|
Clear
Clears the array. This is the equivalent to using with a size of 0
Contains(ScheduleTask)
Contains(item: ScheduleTask) -> boolean
| Type |
Name |
Description |
| ScheduleTask |
item |
|
CopyTo(ScheduleTask[],number)
CopyTo(array: ScheduleTask[],arrayIndex: number) -> nil
| Type |
Name |
Description |
| ScheduleTask[] |
array |
|
| number |
arrayIndex |
|
Remove(ScheduleTask)
Remove(item: ScheduleTask) -> boolean
| Type |
Name |
Description |
| ScheduleTask |
item |
|
GetEnumerator
Gets an enumerator for this .
GetEnumerator() -> IEnumerator__ScheduleTask
ToString
Converts this to a string.