syntax = "proto3";

package mygame;

option optimize_for = SPEED;
option cc_enable_arenas = true;

message Vec3 {
    float x = 1;
    float y = 2;
    float z = 3;
}

message Weapon {
    string name = 1;
    int32 damage = 2;
}

message Monster {
  Vec3 pos = 1;
  int32 mana = 2;
  int32 hp = 3;
  string name = 4;
  bytes inventory = 5;
  enum Color {
        Red = 0;
        Green = 1;
        Blue = 2;
  }
  Color color = 6;
  repeated Weapon weapons = 7;
  Weapon equipped = 8;
  repeated Vec3 path = 9;
}

message Monsters {
    repeated Monster monsters = 1;
}

message rect32 {
    int32 x = 1;
    int32 y = 2;
    int32 width = 3;
    int32 height = 4;
}

message rect32s {
    repeated rect32 rect32_list = 1;
}

message person {
    int32 id = 1;
    string name = 2;
    int32 age = 3;
    double salary = 4;
}

message persons {
    repeated person person_list = 1;
}