You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

31 lines
885 B

using UnityEngine;
public class DispatchMgr : MonoSingleton<DispatchMgr>
{
[SerializeField] DispatchView dispatchView;
public DispatchView DispatchView => dispatchView;
private void LateUpdate()
{
var now = TimeUtils.Now();
foreach(var area in DispatchDataGroup.Instance.DispatchData.Areas)
{
if (area.NeedRefreshMission && !area.IsInRefreshTime(now))
{
area.RefreshMission(now);
}
if (area.NeedClearEmployee && !area.Mission.InProgress(now))
{
area.ClearEmployeeID();
}
if (area.Mission.NeedGetResult && area.Mission.IsAvailableGetResult(now))
{
var playerBattlePower = BuffMgr.Instance.GetBattlePower();
area.Mission.SetResult(playerBattlePower);
}
}
}
}