源战役客户端
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.

57 lines
1.2 KiB

  1. --加载loading
  2. LoadingView = LoadingView or BaseClass(BaseView)
  3. function LoadingView:__init()
  4. self.base_file = "sceneLoad"
  5. self.layout_file = "LoadingView"
  6. self.layer_name = "Top"
  7. -- self.close_mode = CloseMode.CloseVisible
  8. self.close_mode = CloseMode.CloseDestroy
  9. self.destroy_imm = true
  10. self.use_background = false
  11. self.mask_open_sound = true
  12. self.mask_close_sound = true
  13. self.is_set_order_sorting = false
  14. self.load_callback = function ()
  15. self:LoadSuccess()
  16. self:InitEvent()
  17. end
  18. self.open_callback = function ()
  19. end
  20. self.close_callback = function ()
  21. end
  22. self.destroy_callback = function ()
  23. self:Remove()
  24. end
  25. end
  26. function LoadingView:Remove()
  27. if self.loading then
  28. self.loading:DeleteMe()
  29. self.loading = nil
  30. end
  31. end
  32. function LoadingView:LoadSuccess()
  33. self.sub = self:GetChild("sub")
  34. self.image = self:GetChild("image").gameObject
  35. self.loading = Loading.New(self.sub)
  36. SetSizeDelta(self.image.transform,ScreenWidth,ScreenHeight)
  37. UIDepth.SetUIDepth(self.gameObject,true,1200)
  38. end
  39. function LoadingView:InitEvent()
  40. local function imageFun(target)
  41. end
  42. AddClickEvent(self.image,imageFun)
  43. end
  44. function LoadingView:OpenFun()
  45. end