我有这样的原型文件:
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?