Sample input timing code

This commit is contained in:
ChillerDragon 2023-09-17 10:59:37 +02:00
parent 9230f32c6a
commit 27bfbc22ff

View file

@ -11,7 +11,8 @@ context.message is a [InputTiming](../classes/messages/InputTiming.md)
client = TeeworldsClient.new client = TeeworldsClient.new
client.on_input_timing do |context| client.on_input_timing do |context|
# TODO: generated documentation puts "intended_tick: #{context.message.intended_tick}"
puts "time_left: #{context.message.time_left}"
end end
client.connect('localhost', 8303, detach: true) client.connect('localhost', 8303, detach: true)