源战役客户端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

62 行
1.5 KiB

  1. --女神
  2. GoddessVo = GoddessVo or BaseClass(BaseVo)
  3. local GoddessVo = GoddessVo
  4. function GoddessVo:__init()
  5. end
  6. function GoddessVo:__defineVar()
  7. return {
  8. _class_type = self,
  9. _iid = _in_obj_ins_id,
  10. _use_delete_method = false,
  11. vo_type = SceneBaseType.Artifact,
  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. goddess_id = 0, --精灵ID(int32)
  22. model_id = 0, --模型id
  23. texture_res = 0, --贴图
  24. poseState = PoseState.STAND,
  25. birth_angle = 270, --出生角度 水平向右为0 逆时针一圈为360度
  26. owner_id = 0, --所属玩家id
  27. owner_vo = nil, --所属玩家
  28. }
  29. end
  30. function GoddessVo:SetVo(owner_vo)
  31. self.owner_vo = owner_vo
  32. self.owner_id = owner_vo.id
  33. self.goddess_id = owner_vo.escort_state
  34. if self.owner_vo then
  35. self.name = owner_vo.name .. "的女神"
  36. end
  37. end
  38. --取模型id
  39. function GoddessVo:GetGoddessClotheId()
  40. local cfg = nil --Config.Artifactconfig[self.goddess_id]
  41. cfg = Config.ConfigGoddess[(self.goddess_id%100)]
  42. if cfg then
  43. return cfg.model_id
  44. end
  45. return 0
  46. end
  47. function GoddessVo:GetTextureId()
  48. if tonumber(self.texture_res) ~= 0 then
  49. return self:GetGoddessClotheId() .. "_" .. self.texture_res
  50. end
  51. end
  52. function GoddessVo:__delete()
  53. end
  54. function GoddessVo:SetGoddessId(goddess_id)
  55. self.goddess_id = goddess_id
  56. end