part add hp

This commit is contained in:
aozhiwei 2019-07-03 16:40:24 +08:00
parent 446026bc4f
commit f94d82775d
2 changed files with 5 additions and 0 deletions

View File

@ -93,6 +93,8 @@ void Human::FillMFObjectPart(cs::MFObjectPart* part_data)
p->set_obj_uniid(entity_uniid);
TypeConvert::ToPb(pos, p->mutable_pos());
TypeConvert::ToPb(attack_dir, p->mutable_dir());
p->set_health(health);
p->set_max_health(GetMaxHP());
}
void Human::FillMFObjectFull(cs::MFObjectFull* full_data)

View File

@ -124,6 +124,9 @@ message MFPlayerPart
optional int32 obj_uniid = 1; //id
optional MFVector2D pos = 2; //
optional MFVector2D dir = 3; //
optional float max_health = 5; //undefined
optional float health = 6; //undefined
}
//-