|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- // Message2Client
- syntax = "proto3";
- package protobuf;
-
- import "MessageType.proto";
-
- message MessageOfStudent
- {
- int32 x = 1;
- int32 y = 2;
- int32 speed = 3;
- int32 determination = 4; // 剩余的学习毅力,相当于血量
- //int32 fail_num = 5; // 挂科的科目数
- repeated double time_until_skill_available = 6;
- PlaceType place = 7;
- repeated PropType prop = 8;
- PlayerState player_state = 9;
- int64 guid = 10;
- PlayerState state = 11;
- double fail_time = 12; // 挂科的时间
- double emo_time = 14; // EMO的时间
- int64 player_id = 15;
- int32 view_range = 16; // 视野距离
- int32 radius = 17; // 半径
- int32 damage = 18;
- double danger_alert = 19; // 危险警报,在捣蛋鬼靠近时会有预警
- int32 score = 20;
- int32 treat_progress = 21; // 治疗进度
- int32 rescue_progress = 22; // 救援进度
- StudentType student_type = 23;
- repeated StudentBuffType buff = 24;
- }
-
- message MessageOfTricker
- {
- int32 x = 1;
- int32 y = 2;
- int32 speed = 3;
- int32 damage = 4; // 对学生造成的心理伤害
- double time_until_skill_available = 5;
- PlaceType place = 6;
- repeated PropType prop = 7;
- TrickerType tricker_type = 8;
- int64 guid = 9;
- bool movable = 10; // 是否进入了攻击后摇
- int64 player_id = 11;
- int32 view_range = 12; // 视野距离
- int32 radius = 13; // 半径
- PlayerState player_state = 14;
- double trick_desire = 15;
- double class_volume = 16;
- repeated TrickerBuffType buff = 17;
- }
-
- message MessageOfBullet
- {
- BulletType type = 1;
- int32 x = 2;
- int32 y = 3;
- double facing_direction = 4;
- int64 guid = 5;
- PlayerType team = 6;
- PlaceType place = 7;
- double bomb_range = 8;
- }
-
- message MessageOfBombedBullet //for Unity,直接继承自THUAI5
- {
- BulletType type = 1;
- int32 x = 2;
- int32 y = 3;
- double facing_direction = 4;
- int64 mapping_id = 5;
- double bomb_range = 6;
- }
-
- message MessageOfProp // 可拾取道具的信息
- {
- PropType type = 1;
- int32 x = 2;
- int32 y = 3;
- double facing_direction = 4;
- int64 guid = 5;
- PlaceType place = 6;
- int32 size = 7;
- bool is_moving = 8;
- }
-
-
- message MessageOfPickedProp //for Unity,直接继承自THUAI5
- {
- PropType type = 1;
- int32 x = 2;
- int32 y = 3;
- double facing_direction = 4;
- int64 mapping_id = 5;
- }
-
- message MessageOfClassroom
- {
- int32 x = 1;
- int32 y = 2;
- int32 progress = 3;
- }
-
- message MessageOfGate
- {
- int32 x = 1;
- int32 y = 2;
- int32 progress = 3;
- }
-
- message MessageOfDoor
- {
- int32 x = 1;
- int32 y = 2;
- bool is_open = 3;
- }
-
- message MessageOfChest
- {
- int32 x = 1;
- int32 y = 2;
- int32 progress = 3;
- }
-
- message MessageOfMap
- {
- message Row
- {
- repeated PlaceType col = 1;
- }
- repeated Row row = 2;
- }
-
- message MessageOfObj
- {
- oneof message_of_obj
- {
- MessageOfStudent student_message = 1;
- MessageOfTricker tricker_message = 2;
- MessageOfProp prop_message = 3;
- MessageOfBullet bullet_message = 4;
- MessageOfBombedBullet bombed_bullet_message = 5;
- MessageOfClassroom classroom_message = 6;
- MessageOfDoor door_message = 7;
- MessageOfGate gate_message = 8;
- MessageOfChest chest_message = 9;
- }
- }
-
- message MessageOfAll
- {
- int32 game_time = 1;
- int32 subject_left = 2; // 剩余的科目数
- int32 student_graduated = 3; // 已经毕业的学生数
- int32 student_quited = 4; // 已经退学的学生数
- int32 student_score = 5;
- int32 tricker_score = 6;
- bool gate_opened = 7;
- bool hidden_gate_refreshed = 8;
- bool hidden_gate_opened = 9;
- }
-
- message MessageToClient
- {
- repeated MessageOfObj obj_message = 1;
- GameState game_state = 2;
- MessageOfAll all_message = 3;
- }
-
- message MoveRes // 如果打算设计撞墙保留平行速度分量,且需要返回值则可用这个(大概没啥用)
- {
- int64 actual_speed = 1;
- double actual_angle = 2;
- bool act_success = 3;
- }
-
- message BoolRes // 用于只需要判断执行操作是否成功的行为,如捡起道具、使用道具
- {
- bool act_success = 1;
- }
-
- message MsgRes // 用于获取队友发来的消息
- {
- bool have_message = 1; // 是否有待接收的消息
- int64 from_player_id = 2;
- string message_received = 3;
- }
|