| | |
| | | //----关于前期无操作自动执行主线 |
| | | public int TaskAutoLv = 0; |
| | | public int TaskAutoTime = 0; |
| | | |
| | | public bool TaskOverBool = false; |
| | | private int Times = 0; |
| | | private int NeedWaitTime = 4; |
| | | PackModel _playerPack; |
| | | PackModel playerPack { |
| | | get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); } |
| | |
| | | GlobalTimeEvent.Instance.secondEvent += secondEvent; |
| | | TaskAllocation.Instance.TaskTime = TimeUtility.ServerNow; |
| | | AutomaticityBool = true; |
| | | TaskOverBool = false; |
| | | } |
| | | |
| | | |
| | |
| | | int missionState = allMissionDict[MissionID].MissionState; |
| | | if (allMissionDict[MissionID].MissionState != MissionState && MissionState == 3 && AutomaticityBool) |
| | | { |
| | | TaskOverBool = true; |
| | | if (CompletionOfTaskEvent != null) |
| | | { |
| | | CompletionOfTaskEvent(MissionID); |
| | |
| | | else |
| | | { |
| | | IsGetOnBool = false; |
| | | }
|
| | |
|
| | | if (TaskOverBool)
|
| | | {
|
| | | Times += 1;
|
| | | if (Times >= NeedTime)
|
| | | {
|
| | | TaskOverBool = false;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (Times != 0)
|
| | | {
|
| | | Times = 0;
|
| | | }
|
| | | } |
| | | } |
| | | |