示例#1
0
        private void AddNewUnit(PlayerStore playerStore, UnitId unitId)
        {
            try
            {
                var time = playerStore.Units[unitId].InitDate;

                if ((DateTime.Now - time).Seconds > PSettings.PreferenceAll.OverlayAlert.Time)
                {
                    playerStore.Units[unitId] = new UnitListData(time, false, true);
                }
            }
            catch (KeyNotFoundException)
            {
                playerStore.Units.Add(unitId, new UnitListData(DateTime.Now, true, false));
            }
        }
示例#2
0
        private void AddNewUnit(PlayerStore playerStore, UnitId unitId)
        {
            try
            {
                var time = playerStore.Units[unitId].InitDate;

                if ((DateTime.Now - time).Seconds > PSettings.PreferenceAll.OverlayAlert.Time)
                    playerStore.Units[unitId] = new UnitListData(time, false, true);
            }
            catch (KeyNotFoundException)
            {
                playerStore.Units.Add(unitId, new UnitListData(DateTime.Now, true, false));
            }
        }