class
Godot::PackedVector2Array
- Godot::PackedVector2Array
- Reference
- Object
Included Modules
- Enumerable(Godot::Vector2)
Defined in:
libgodot/collections.crConstructors
- .from(items : Array(Vector2)) : PackedVector2Array
- .new(size : Int, initial_value : Vector2 = Vector2.new)
- .new(initial_items : Array(Vector2))
- .new
Instance Method Summary
- #<<(value : Vector2) : self
- #[](index : Int) : Vector2
- #[]=(index : Int, value : Vector2) : Vector2
- #[]?(index : Int) : Vector2 | Nil
- #append(value : Vector2) : self
- #clear : Void
-
#each(&block : Vector2 -> Void) : Void
Must yield this collection's elements to the block.
-
#empty? : Bool
Returns
trueifselfdoes not contain any element. - #is_empty : Bool
- #push(value : Vector2) : self
- #resize(new_size : Int) : Void
-
#size : Int64
Returns the number of elements in the collection.
-
#to_a : Array(Vector2)
Returns an
Arraywith all the elements in the collection.
Constructor Detail
Instance Method Detail
Description copied from module Enumerable(Godot::Vector2)
Must yield this collection's elements to the block.
def empty? : Bool
#
Description copied from module Enumerable(Godot::Vector2)
Returns true if self does not contain any element.
([] of Int32).empty? # => true
([1]).empty? # => false
[nil, false].empty? # => false
#present?returns the inverse.
def size : Int64
#
Description copied from module Enumerable(Godot::Vector2)
Returns the number of elements in the collection.
[1, 2, 3, 4].size # => 4
Description copied from module Enumerable(Godot::Vector2)
Returns an Array with all the elements in the collection.
(1..5).to_a # => [1, 2, 3, 4, 5]