源战役客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.8 KiB

  1. --百团护送
  2. GWFollowerVo = GWFollowerVo or BaseClass(BaseVo)
  3. local GWFollowerVo = GWFollowerVo
  4. function GWFollowerVo:__init()
  5. end
  6. function GWFollowerVo:__defineVar()
  7. return {
  8. _class_type = self,
  9. _iid = _in_obj_ins_id,
  10. _use_delete_method = false,
  11. vo_type = SceneBaseType.GWFollower,
  12. pos_x = 0, --X像素坐标(int16)
  13. pos_y = 0, --Y像素坐标(int16)
  14. hp = 100, --当前hp(int32)
  15. maxHp = 100, --最大hp(int32)
  16. name = "", --名字(string)
  17. move_speed = 160, --速度(int16)
  18. ghost_mode = 0,
  19. hide_flag = 0 , --是否不可见(int8)
  20. warGroup = 0, --战斗分组(int8)
  21. gwfollower_id = 0, --护送粮草id
  22. texture_res = 0, --贴图
  23. poseState = PoseState.STAND,
  24. birth_angle = 270, --出生角度 水平向右为0 逆时针一圈为360度
  25. owner_id = 0, --所属玩家id
  26. owner_vo = nil, --所属玩家
  27. }
  28. end
  29. function GWFollowerVo:SetVo(owner_vo)
  30. self.owner_vo = owner_vo
  31. self.owner_id = owner_vo.id
  32. self.gwfollower_id = owner_vo:GetFlagsByKey(RoleVo.Act_Flag.GUILD_WAR_EQUIP_CAMION)-- 10010203 --owner_vo.escort_state
  33. if self.owner_vo then
  34. self.name = owner_vo.name .. "的粮草"
  35. end
  36. end
  37. --取模型id
  38. function GWFollowerVo:GetGWFollowerClotheId()
  39. if self.gwfollower_id == GuildModel.GuildWarTarget.BigRice then
  40. return GuildModel.GuildWarModelRes.BigRice
  41. elseif self.gwfollower_id == GuildModel.GuildWarTarget.MiddleRice then
  42. return GuildModel.GuildWarModelRes.MiddleRice
  43. else
  44. return GuildModel.GuildWarModelRes.SmallRice
  45. end
  46. end
  47. function GWFollowerVo:GetTextureId()
  48. if tonumber(self.texture_res) ~= 0 then
  49. return self:GetGWFollowerClotheId() .. "_" .. self.texture_res
  50. end
  51. end
  52. function GWFollowerVo:__delete()
  53. end
  54. function GWFollowerVo:SetGWFollowerId(gwfollower_id)
  55. self.gwfollower_id = gwfollower_id
  56. end