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