class
Godot::TypedChannel(T)
- Godot::TypedChannel(T)
- Reference
- Object
Overview
Strongly-typed generic wrapper around Godot::Channel for type-safe Crystal gameplay code.
channel = Godot::TypedChannel(Godot::Vector3).new(16)
channel.send(Godot::Vector3.new(1.0, 2.0, 3.0))
spawn do
if pos = channel.await_receive
player.position = pos
end
end
Defined in:
libgodot/channel.crConstructors
Instance Method Summary
- #await_receive(timeout_sec : Float64 | Nil = nil) : T | Nil
- #capacity : Int32
- #channel : Godot::Channel
- #close : Void
- #closed? : Bool
- #destroy : Void
- #empty? : Bool
- #full? : Bool
- #receive(timeout_sec : Float64 | Nil = nil) : T | Nil
- #send(val : T) : Bool
- #size : Int32
- #try_receive : T | Nil
- #try_send(val : T) : Bool