syntax = "proto3";

option go_package = "common/proto/gen/cs";
import "common.proto";

// MESSAGE_ID_ENTER_INSTANCE
message C2S_EnterInstance {
  int32 InstanceID = 1;
}
message S2C_EnterInstance {
  PositionInfo Info = 1;
}

// MESSAGE_ID_ACTION
enum ActionID {
  ACTION_ID_INVALID = 0;
  ACTION_ID_MOVE = 1; // 1-15都是移动指令
  ACTION_ID_ATTACK = 16; // 攻击指令
}
message C2S_Action {
  ActionID Action = 1; // 指令ID
  bytes Payload = 2; // 指令数据
}

// MESSAGE_ID_POSITION
message PositionInfo {
  int32 UID = 1;
  double X = 2;
  double Y = 3;
}
message S2C_Position {
  repeated PositionInfo Info = 1;
}