1

我有这样的原型文件:

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_keystatusset_mouseclick只有set_angle. 那我该如何设置keystatus呢?

4

1 回答 1

2

你读过文档吗?例如,尝试该mutable_keystatus()方法。

于 2012-09-02T10:53:41.557 回答