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.

33 lines
1.2 KiB

  1. local RoomPlayerInfoViewBase=require("luaScript.Views.Room.RoomPlayerInfoView")
  2. local CoinRoomPlayerInfoView = class("CoinRoomPlayerInfoView", RoomPlayerInfoViewBase)
  3. function CoinRoomPlayerInfoView:ctor(uid, userInfo, headPos, szHead, recordTime, replayRecord)
  4. CoinRoomPlayerInfoView.super.ctor(self, uid, userInfo, headPos, szHead, recordTime, replayRecord);
  5. self.uid = uid
  6. end
  7. function CoinRoomPlayerInfoView:onEnter()
  8. CoinRoomPlayerInfoView.super.onEnter(self)
  9. --金币场不显示语音按钮
  10. self.ui.Items.Layout_play_voice:setVisible(false)
  11. --刷新layout布局
  12. self.ui.Items.Layout_3:requestDoLayout()
  13. self.ui.Items.Layout_3:doLayout()
  14. --金币场不显示id(因为机器人id是连号)
  15. self.ui.Items.Layout_4:setVisible(false);
  16. self.ui.Items.Layout_Info:requestDoLayout()
  17. self.ui.Items.Layout_Info:doLayout()
  18. --金币场增加玩家金币数
  19. self.ui.Items.Text_4:setVisible(true)
  20. self.ui.Items.Text_4:setText("金 币:")
  21. --子游戏需要在自己的protocol里面增加getCoinByUserId(userID)用于获取玩家金币数量
  22. local coin = app.room:getCoinByUserId(self.uid)
  23. self.ui.Items.Text_RegTime:setText(coin)
  24. self.ui.Items.Text_RegTime:setVisible(true)
  25. end
  26. return CoinRoomPlayerInfoView;