我有这样的原型文件:
message Control {
message KeyStatus {
required bool keyUp = 1;
required bool keyDown = 2;
required bool keyLeft = 3;
required bool keyRight = 4;
}
message MouseClick {
required double x = 1;
required double y = 2;
optional bool buttonRight = 3;
}
required KeyStatus keyStatus = 1;
required double angle = 2;
optional MouseClick mouseClick = 3;
}
在生成的代码中没有方法set_keystatus
或set_mouseclick
只有set_angle
. 那我该如何设置keystatus呢?