public void OnPlayerEnter(DungeonScene _this, ObjPlayer player) { Scene.GetImpl().OnPlayerEnter(_this, player); //修改副本难度 _this.ChangeDifficulty(_this.PlayerCount); var now = DateTime.Now; if (_this.GetTriggerTime(eDungeonTimerType.WaitStart) > now) { _this.NotifyDungeonTime(player, eDungeonTimerType.WaitStart); } else if (_this.GetTriggerTime(eDungeonTimerType.WaitExtraTimeStart) > now) { _this.NotifyDungeonTime(player, eDungeonTimerType.WaitExtraTimeStart); } else if (_this.GetTriggerTime(eDungeonTimerType.WaitEnd) > now) { _this.NotifyDungeonTime(player, eDungeonTimerType.WaitEnd); } else { _this.NotifyDungeonTime(player, eDungeonTimerType.WaitClose); } }
public void EnterAutoClose(DungeonScene _this, int seconds = 20) { _this.State = eDungeonState.WillClose; _this.StartTimer(eDungeonTimerType.WaitClose, DateTime.Now.AddSeconds(seconds), () => { _this.TimeOverClose(); }); _this.NotifyDungeonTime(eDungeonTimerType.WaitClose); NotifySceneFinished(_this); }
public virtual void StartDungeon(DungeonScene _this) { _this.State = eDungeonState.Start; //通知客户端更新倒计时显示 _this.NotifyDungeonTime(eDungeonTimerType.WaitEnd); }