继续调整,创建 Procedure 与 Presentation 程序集

- 创建 Procedure 与 Presentation 两个程序集
- 初步解决这两个程序集与原程序集的引用关系
This commit is contained in:
SepComet
2026-06-02 23:26:08 +08:00
parent affa44e4d0
commit 6b8a6a8789
50 changed files with 907 additions and 688 deletions
@@ -1,20 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using SepCore.DataTable;
using SepCore.Definition;
using Entity;
using Procedure;
using UnityEngine;
using Random = UnityEngine.Random;
using UnityGameFramework.Runtime;
using CustomUtility;
using GameFramework.DataTable;
namespace UI
{
internal class LevelUpFormUseCase : IUIUseCase
public class LevelUpFormUseCase : IUIUseCase
{
private const int BaseRefreshPrice = 2;
private readonly GameStateLevelUp _gameStateLevelUp;
private readonly Action _onCompleted;
private readonly DRLevelUpReward[] _allRewards;
private readonly IDataTable<DRLevelRarity> _levelRarityTable;
private readonly Dictionary<ItemRarity, List<DRLevelUpReward>> _rewardsByRarity = new();
@@ -22,13 +22,13 @@ namespace UI
private int _refreshCount;
private LevelUpFormRawData _currentModel;
private readonly Player _player;
public LevelUpFormUseCase(Player player, GameStateLevelUp gameStateLevelUp)
public LevelUpFormUseCase(Player player, Action onCompleted)
{
_player = player;
_gameStateLevelUp = gameStateLevelUp;
_onCompleted = onCompleted;
_allRewards = GameEntry.DataTable.GetDataTable<DRLevelUpReward>().ToArray();
_levelRarityTable = GameEntry.DataTable.GetDataTable<DRLevelRarity>();
@@ -39,7 +39,7 @@ namespace UI
{
_refreshCount = 0;
if (_gameStateLevelUp == null || _player.PendingLevelPoints <= 0)
if (_player == null || _player.PendingLevelPoints <= 0)
{
_currentModel = null;
return null;
@@ -90,7 +90,7 @@ namespace UI
return _currentModel;
}
_gameStateLevelUp.IsCompleted = true;
_onCompleted?.Invoke();
_currentModel = null;
return null;
}