| | |
| | | ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | List<AutoTreasureAwardsRow> awardsRows = new List<AutoTreasureAwardsRow>();
|
| | | Vector3 pos = Vector3.zero;
|
| | | private bool isStart = true;
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | |
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | isStart = false;
|
| | | StopAllCoroutines();
|
| | | luckyTreasureModel.isAutoLuckyTreasure = false;
|
| | | deadModel.playerDieEvent -= UpdatePlayerDie;
|
| | |
| | | private void SetDisplay()
|
| | | {
|
| | | luckyTreasureModel.isAutoLuckyTreasure = true;
|
| | | isStart = luckyTreasureModel.isAutoLuckyTreasure;
|
| | | awardsRows.Clear();
|
| | | UpdateAwardsItem();
|
| | | UpdateLuckyTreasureState();
|
| | |
| | | private void UpdateLuckyResult()
|
| | | {
|
| | | UpdateAwardsItem();
|
| | | if(luckyTreasureModel.isAutoLuckyTreasure)
|
| | | if(isStart)
|
| | | {
|
| | | if(luckyTreasureModel.IsBigLuckItem())
|
| | | {
|
| | |
| | | private void UpdateLuckyTreasureState()
|
| | | {
|
| | | treasureBtn.RemoveAllListeners();
|
| | | if (luckyTreasureModel.isAutoLuckyTreasure)
|
| | | if (isStart)
|
| | | {
|
| | | treasureBtn_Text.text = Language.Get("LuckyTreasure104");
|
| | | treasureBtn.AddListener(ClickStopLuckyTreasure);
|
| | |
| | |
|
| | | private void ClickStopLuckyTreasure()
|
| | | {
|
| | | isStart = false;
|
| | | UpdateLuckyTreasureState();
|
| | | }
|
| | |
|
| | | private void ClickLuckyTreasure()
|
| | | {
|
| | | isStart = true;
|
| | | luckyTreasureModel.SendStartLuckyTreasure();
|
| | | UpdateLuckyTreasureState();
|
| | | }
|