Skip to content

Commit dd0967e

Browse files
committed
add comment about RPCs
1 parent bab0907 commit dd0967e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

net-pong/rust/src/paddle.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ impl IArea2D for Paddle {
2828
.connect_self(|this: &mut Self, mut area: Gd<Area2D>| {
2929
if this.base().is_multiplayer_authority() {
3030
// Set a random direction for the ball to go in
31+
// Note: all RPCs consume their arguments as Variant
32+
// this is a limitation of godot-rust
33+
// we currently don't have a way to statically type RPCs the way we do for signals
34+
// so we have to use Variant and convert manually
3135
let args = vslice![this.left, randf()];
3236
area.rpc("bounce", args);
3337
}

0 commit comments

Comments
 (0)