GuessSizeView.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. //
  2. // GuessSizeView.h
  3. // BuguLive
  4. //
  5. // Created by 布谷 on 2017/5/26.
  6. // Copyright © 2017年 xfg. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "CoinView.h"
  10. #import "BetView.h"
  11. #import "GameRechargeView.h"
  12. #import "GameGainModel.h"
  13. #import <FLAnimatedImage/FLAnimatedImage.h>
  14. @class GuessSizeView;
  15. @protocol GuessSizeViewDelegate <NSObject>
  16. @optional
  17. @required
  18. // 显示充值
  19. - (void)clickRecharge;
  20. //让游戏记录弹出
  21. - (void)displayGameHistory;
  22. //弹出游戏获胜视图
  23. - (void)displayGameWinWithGainModel:(GameGainModel *)gainModel;
  24. //倒计时还是5秒时主动请求接口,防止推送接收不到出现的问题
  25. - (void)reloadGameData;
  26. - (void)choseArcOrMrcGameWithView:(UIView *)guessSizeView;
  27. @end
  28. @interface GuessSizeView : UIView<BetViewDelegate>
  29. {
  30. BetView *_historyView;
  31. BetView *_gameOverView; //游戏结束
  32. CGPoint _amountPoint; //押注金额的中心位置
  33. CGPoint _betPoint; //押注视图的中心位置
  34. CGPoint _coinPoint; //金币余额的中心位置
  35. CGPoint _winCoinPoint; //游戏胜利金额的中心位置
  36. NSInteger _bet; //押注区域选项
  37. NSInteger _betCount; //押注金额的选项
  38. NSString *_betMoney; //押注金额
  39. UIImageView *_breathImg; //金币动画的图片
  40. BOOL _isClick; //是否点击
  41. NetHttpsManager *_httpManager;
  42. GlobalVariables *_BuguLive;
  43. }
  44. @property (weak, nonatomic) IBOutlet UIImageView *deskImageView;
  45. @property (weak, nonatomic) IBOutlet UIImageView *clockImageView;
  46. @property (weak, nonatomic) IBOutlet UIImageView *bigSizeImageView;
  47. @property (weak, nonatomic) IBOutlet UIImageView *middleSizeImageView;
  48. @property (weak, nonatomic) IBOutlet UIImageView *smallSizeImageView;
  49. @property (nonatomic, strong) UILabel * timeLabel;
  50. //存放三个押注视图
  51. @property (nonatomic, strong) NSArray * betImageArray;
  52. @property (nonatomic, strong) NSMutableArray * betArr;
  53. @property (nonatomic, strong) NSMutableArray * userBetArr;
  54. @property (nonatomic, strong) NSMutableArray * betLabelArr;//押注label数组
  55. @property (nonatomic, strong) NSMutableArray * userBetLabelArr;//个人押注label数组
  56. @property (nonatomic, strong) NSArray * betOptionArray;//投注金额选项
  57. @property (nonatomic, assign) BOOL isArc;
  58. @property (nonatomic, strong) BetView *arcOrMrcGameView;
  59. @property (nonatomic, strong) BetView *betView;
  60. @property (nonatomic, strong) NSMutableArray * optionArr; // 押注倍率
  61. @property (nonatomic, strong) NSMutableArray * coinMoveArray; //金币移动的位置
  62. @property (nonatomic, strong) NSMutableArray * coinBtnArray; //选择押注金额的按钮的数组
  63. @property (nonatomic, strong) NSMutableArray * breathImgArray; //呼吸灯图片数组
  64. @property (nonatomic, strong) NSMutableArray * coinBeignArray; //押注金额的开始位置的数组
  65. @property (nonatomic, strong) NSMutableArray * betViewArray; //押注视图的数组
  66. @property (nonatomic, strong) UIView * buttomView;
  67. @property (nonatomic, strong) GameRechargeView *gameRechargeView;//底部金币视图
  68. @property (nonatomic, assign) BOOL canBet;//可以点击下注
  69. @property (nonatomic, assign) BOOL isHost;//是否是主播
  70. @property (nonatomic, assign) BOOL canCloseGame;//是否可以结束游戏(防止重复点击)
  71. //@property (nonatomic, strong) UIImageView * diceImageViewOne;
  72. //@property (nonatomic, strong) UIImageView * diceImageViewTwo;
  73. @property (nonatomic, strong) NSTimer * showDiceTimer;
  74. @property (nonatomic, assign) int countTime;
  75. @property (nonatomic, weak) id<GuessSizeViewDelegate>delegate;
  76. @property (nonatomic, assign) NSInteger currentMoney; //当前账户余额
  77. @property (nonatomic, copy) NSString * game_log_id;
  78. @property (nonatomic, strong) NSMutableArray * betMultipleLabelArr;
  79. @property (nonatomic, strong) NSMutableArray * maskViewArr;
  80. @property (nonatomic, strong) FLAnimatedImageView * diceImageViewOne;
  81. @property (nonatomic, strong) FLAnimatedImageView * diceImageViewTwo;
  82. @property (nonatomic, strong) NSArray * maskViewNameArr;
  83. /**
  84. 加载点数大小,此方法用于展示骰子大小时调用
  85. @param dicesArr 点数数组
  86. */
  87. - (void)loadDiceWithDicesArr:(NSArray *)dicesArr andResultWinPostion:(NSInteger )winPostion;
  88. /**
  89. 加载押注数据
  90. @param betArray 总的押注数组
  91. @param userBetArray 个人押注数组
  92. */
  93. - (void)loadBetDataWithBetArray:(NSArray *)betArray andUserBetArray:(NSArray *)userBetArray;
  94. /**
  95. 骰子打开倒计时
  96. @param time 倒计时时长
  97. */
  98. - (void)showTime:(int)time;
  99. /**
  100. 创建游戏相关的label
  101. */
  102. - (void)creatLabel;
  103. /**
  104. 创建下注相关视图
  105. */
  106. - (void)createButtomView;
  107. - (void)loadOptionArray:(NSArray *)optionArray;
  108. - (void)disClockTime;
  109. /**
  110. 游戏结束更新余额
  111. @param ID 游戏ID
  112. */
  113. - (void)updateCoinWithID:(NSString *)ID;
  114. - (void)judgmentBetView:(NSInteger)coin;
  115. @end