源战役客户端
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.1 KiB

  1. AttrNumberDisplay = AttrNumberDisplay or BaseClass()
  2. function AttrNumberDisplay:__init()
  3. --现在这个csprite是临时的,里面包含的图元可以通过/assets/temp_esprites/damage.esprite看到
  4. -- self.damage_render_group = RenderGroup.GRQ_AIR --伤害数字显示的渲染队列
  5. -- self.damage_csprite = GameRes.PathTool.GetUIResPath("xx_damage_font")
  6. AttrNumberDisplay.Instance = self
  7. self.worldFontMgr = WorldArtFontManager:getInstance()
  8. end
  9. function AttrNumberDisplay:SetInfoByDamageType(type)
  10. end
  11. function AttrNumberDisplay:getInstance()
  12. if AttrNumberDisplay.Instance == nil then
  13. AttrNumberDisplay.Instance = AttrNumberDisplay.New()
  14. end
  15. return AttrNumberDisplay.Instance
  16. end
  17. function AttrNumberDisplay:__delete()
  18. -- if self.res_keeper then
  19. -- self.res_keeper:DeleteMe()
  20. -- self.res_keeper = nil
  21. -- end
  22. end
  23. function AttrNumberDisplay:ShowAttrNumber()
  24. local font_id = self.worldFontMgr:CreateWorldArtFont()
  25. self.worldFontMgr:AddArtFontImg(font_id, "scene_str",52)
  26. self.worldFontMgr:AddArtFontNumber(font_id, tostring(3), "scene_damage_",25)
  27. end
  28. function AttrNumberDisplay:Update()
  29. end