| | |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | public class JadeDynastyTowerModel : Model, IPlayerLoginOk, IMapInitOk, IBeforePlayerDataInitialize |
| | | public class JadeDynastyTowerModel : Model, IPlayerLoginOk, IMapInitOk, IBeforePlayerDataInitialize, ISwitchAccount |
| | | { |
| | | public const int DATA_MAPID = 31370; |
| | | const int REDPOINTID = 1; |
| | | const int REDPOINTID_01 = 21501; |
| | | const int REDPOINTID_02 = 215; |
| | | const int FUNCTIONID = 164; |
| | | |
| | | public int highestPassFloor { get; private set; } |
| | |
| | | public bool openJadeDynastyTower { get; set; } |
| | | |
| | | bool serverInited = false; |
| | | Redpoint redpoint = new Redpoint(REDPOINTID); |
| | | |
| | | bool redpointConfirm_01 = false; |
| | | bool redpointConfirm_02 = false; |
| | | |
| | | Redpoint redpoint01 = new Redpoint(37, REDPOINTID_01); |
| | | Redpoint redpoint02 = new Redpoint(REDPOINTID_02); |
| | | |
| | | List<int> sortedFloors = new List<int>(); |
| | | |
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } } |
| | |
| | | case 1: |
| | | break; |
| | | case 2: |
| | | SysNotifyMgr.Instance.ShowTip("SingleEnterCD", DATA_MAPID); |
| | | break; |
| | | case 3: |
| | | SysNotifyMgr.Instance.ShowTip("GeRen_chenxin_268121", DATA_MAPID); |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | return 1; |
| | | } |
| | | |
| | | var coolDown = dungeonModel.GetEnterCoolDown(JadeDynastyTowerModel.DATA_MAPID); |
| | | var coolDown = dungeonModel.GetEnterCoolDown(DATA_MAPID); |
| | | if (coolDown != null && coolDown.suplursSeconds > 0) |
| | | { |
| | | return 2; |
| | |
| | | } |
| | | } |
| | | |
| | | public void ConfirmRedpoint01() |
| | | { |
| | | redpointConfirm_01 = true; |
| | | UpateRedpoint(); |
| | | } |
| | | |
| | | public void ConfirmRedpoint02() |
| | | { |
| | | redpointConfirm_02 = true; |
| | | UpateRedpoint(); |
| | | } |
| | | |
| | | public void OnPlayerLoginOk() |
| | | { |
| | | serverInited = true; |
| | | UpateRedpoint(); |
| | | } |
| | | |
| | | public void OnSwitchAccount() |
| | | { |
| | | redpointConfirm_01 = false; |
| | | redpointConfirm_02 = false; |
| | | } |
| | | |
| | | public void OnMapInitOk() |
| | |
| | | case DATA_MAPID: |
| | | RequestRefreshMonster(); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | private void UpateRedpoint() |
| | | { |
| | | var challengable = IsChallengable(); |
| | | |
| | | if (!redpointConfirm_01) |
| | | { |
| | | redpoint01.state = challengable ? RedPointState.Simple : RedPointState.None; |
| | | } |
| | | else |
| | | { |
| | | redpoint01.state = RedPointState.None; |
| | | } |
| | | |
| | | if (!redpointConfirm_02) |
| | | { |
| | | redpoint02.state = challengable ? RedPointState.Simple : RedPointState.None; |
| | | } |
| | | else |
| | | { |
| | | redpoint02.state = RedPointState.None; |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | serverInited = false; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | |