P0-02 补齐数据表:组件、敌人、波次、节点、事件、商店商品
- 组件:
- 底座:Assets\GameMain\DataTables\BaseComp.txt
- 轴承:Assets\GameMain\DataTables\BearingComp.txt
- 枪口:Assets\GameMain\DataTables\MuzzleComp.txt
- 敌人:Assets\GameMain\DataTables\Enemy.txt
- 波次:
- 关卡:Assets\GameMain\DataTables\Level.txt
- 关卡阶段(波次):Assets\GameMain\DataTables\LevelPhase.txt
- 波次条目(波次出怪规则):Assets\GameMain\DataTables\LevelSpawnEntry.txt
- 事件:Assets\GameMain\DataTables\Event.txt
- 商店:Assets\GameMain\DataTables\ShopPrice.txt
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
using GeometryTD.Definition;
|
||||
using GeometryTD.UI;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace GeometryTD.UI
|
||||
{
|
||||
public class EventFormUseCase : IUIUseCase
|
||||
{
|
||||
private EventItem m_CurrentEvent;
|
||||
|
||||
public void SetCurrentEvent(EventItem eventItem)
|
||||
{
|
||||
m_CurrentEvent = eventItem;
|
||||
}
|
||||
|
||||
public EventFormRawData CreateInitialModel()
|
||||
{
|
||||
if (m_CurrentEvent == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new EventFormRawData
|
||||
{
|
||||
EventItem = m_CurrentEvent
|
||||
};
|
||||
}
|
||||
|
||||
public EventOption SelectOption(int optionIndex)
|
||||
{
|
||||
if (m_CurrentEvent == null || m_CurrentEvent.Options == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (optionIndex < 0 || optionIndex >= m_CurrentEvent.Options.Length)
|
||||
{
|
||||
Log.Warning("EventFormUseCase.SelectOption() option index is invalid: {0}", optionIndex);
|
||||
return null;
|
||||
}
|
||||
|
||||
// TODO: 执行 Requirements 校验、CostEffects/RewardEffects 结算与后续节点推进。
|
||||
return m_CurrentEvent.Options[optionIndex];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 80d6d6100109462ea498781e9e70201d
|
||||
timeCreated: 1772104203
|
||||
Reference in New Issue
Block a user