Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

fixed: fixed renamed bug of proto #26

Merged
merged 2 commits into from
Oct 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 30 additions & 31 deletions dependency/proto/Message2Clients.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,54 +10,54 @@ import "MessageType.proto";

message ChangeableCharacterProperty
{
int64 x = 1;
int64 y = 2;
int64 attackRange = 3;
int64 bulletNum = 4;
int64 speed = 5;
int64 life = 6;
double timeUntilCommonSkillAvailable = 7;
double timeUntilUltimateSkillAvailable = 8;
int64 gemNum = 9;
BuffType buff = 10;
PropType prop = 11;
PlaceType place = 12;
int32 x = 1;//可见
int32 y = 2;//可见
int32 attackRange = 3;//可见
int32 bulletNum = 4;
int32 speed = 5;//可见
int32 life = 6;//可见
double timeUntilCommonSkillAvailable = 7; //可见
double timeUntilUltimateSkillAvailable = 8;//底层未实现
int32 gemNum = 9;//可见
BuffType buff = 10;//可见
PropType prop = 11;//可见
PlaceType place = 12;//人物背景框颜色
}

message BasicalCharacterProperty
{
int64 guid = 1; //操作方法:Client和Server互相约定guid。非负整数中,1-8这8个guid预留给8个人物,其余在子弹或道具被创造/破坏时分发和回收。Client端用向量[guid]储存物体信息和对应的控件实例。
int32 guid = 1; //操作方法:Client和Server互相约定guid。非负整数中,1-8这8个guid预留给8个人物,其余在子弹或道具被创造/破坏时分发和回收。Client端用向量[guid]储存物体信息和对应的控件实例。
//0号guid存储单播模式中每人Client对应的GUID。
int64 PassiveSkillType = 2;
int64 ActiveSkillType = 3;
int32 PassiveSkillType = 2;//可见 (职1)
int32 ActiveSkillType = 3;//可见(职2)
}

message MessageOfProp
{
PropType type = 1;
int64 x = 2;
int64 y = 3;
int32 x = 2;
int32 y = 3;
}

message MessageOfBullet
{
BulletType type = 1;
int64 bulletAP = 2;
int64 boomRange = 3;
int32 bulletAP = 2;
int32 boomRange = 3;
}

message MessageToInitialize //初始化信息,只在Server接收Client的开始游戏信息后发送,内容是在整局游戏里不变的数据
{
int64 MapSerial = 1;
int64 NumberOfValidPlayer = 2;
int32 MapSerial = 1;
int32 NumberOfValidPlayer = 2;
repeated BasicalCharacterProperty property = 3;
}
//全设成int64了,麻烦逻辑组其他二位指正
//全设成int32了,麻烦逻辑组其他二位指正
message MessageToAddInstance
{
GameObjType instanceType= 1; //这里逻辑上只能写道具和子弹,Client也只准备了这两个实例的创建函数。
//人物在开始时通过BasicalVharacterProperty中的信息添加,无法手动添加。如果需要有添加草丛的操作,请联系我。
int64 guid = 2; //要分配的guid。为防止重复分配,建议Server也写一个对应的vector。
//人物在开始时通过BasicalCharacterProperty中的信息添加,无法手动添加。如果需要有添加草丛的操作,请联系我。
int32 guid = 2; //要分配的guid。为防止重复分配,建议Server也写一个对应的vector。
oneof messageOfInstance //根据instanceType决定消息类型
{
MessageOfProp messageOfProp= 3;
Expand All @@ -67,15 +67,15 @@ message MessageToAddInstance

message MessageToDestroyInstance
{
int64 guid = 1;
int32 guid = 1;
}
//拿到要销毁物体的guid后,Client端vector释放掉该guid位置的物体信息,并置为null回收该地址,同时删除该物品的对应控件句柄。
//人物的guid无法被回收,死亡时颜色变为透明。任何试图将guid1-8删除的操作应被认定为非法。
//人物的guid无法被回收,死亡时颜色变为透明。任何试图将guid0和1-8删除的操作应被认定为非法。
//子弹被销毁的同时会显示一个爆炸效果。饼:画圆

message MessageToOperate
{
int32 operateKind = 1;
bool operateKind = 1;
oneof messageOfOperation
{
MessageToAddInstance messageToAddInstance= 2;
Expand All @@ -97,11 +97,10 @@ message MessageToRefresh

message MessageToOneClient
{
int64 playerID = 1; //指明发送给谁
int64 teamID = 2; //指明发送给谁

int32 playerID = 1; //指明发送给谁
int32 teamID = 2; //指明发送给谁
MessageType messageType = 3;
int64 guid = 4; //自己的guid
int32 guid = 4; //自己的guid
string message = 5; //如果 messageType 为 Send,则为要发送的消息
} //继承自THUIAI4
//注:转换函数还没写好
20 changes: 10 additions & 10 deletions dependency/proto/MessageType.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ enum MessageType

enum GameObjType
{
Null = 0;
NullGameObjType = 0;
Character = 1;
Wall = 2;
Prop = 3;
Expand All @@ -35,13 +35,13 @@ enum GameObjType
}
enum ShapeType
{
Null = 0;
NullShapeType = 0;
Circle = 1; //仍然,子弹和人物为圆形,格子为方形
Square = 2;
}
enum PlaceType //位置标志,包括陆地,草丛,以及角色技能带来的隐身。游戏中每一帧都要刷新各个物体的该属性
{
Null = 0;
NullPlaceType = 0;
Land = 1;
Grass1 = 2;
Grass2 = 3;
Expand All @@ -50,7 +50,7 @@ enum PlaceType //位置标志,包括陆地,草丛,以及角色技能带
}
enum PropType // 道具的类型
{
Null = 0;
NullPropType = 0;
addHP = 1;
addAP = 2;
addSpeed = 3;
Expand All @@ -65,7 +65,7 @@ enum PropType // 道具的类型
}
enum PassiveSkillType // 被动技能,有名字的都是已经实现了的
{
Null = 0;
NullPassiveSkillType = 0;
RecoverAfterBattle = 1;
SpeedUpWhenLeavingGrass = 2;
Vampire = 3;
Expand All @@ -75,7 +75,7 @@ enum PassiveSkillType // 被动技能,有名字的都是已经实现了的
}
enum ActiveSkillType // 主动技能,有名字的都是已经实现了的
{
Null = 0;
NullActiveSkillType = 0;
BecomeVampire = 1;
BecomeAssassin = 2;
NuclearWeapon = 3;
Expand All @@ -85,17 +85,17 @@ enum ActiveSkillType // 主动技能,有名字的都是已经实现了的
}
enum BuffType //buff
{
Null = 0;
NullBuffType = 0;
MoveSpeed = 1;
AP = 2;
CD = 3;
AddLIFE = 4;
Shield = 5;
Spear = 6;
ShieldBuff = 5;
SpearBuff = 6;
}
enum BulletType //会有不同类型的子弹,现在只实现了“原子弹”
{
Null = 0;
NullBulletType = 0;
AtomBomb = 1;
// ...
// ...
Expand Down