IndieGame/client/Assets/Scripts/System/Condition/ConditionSystem.cs
DOBEST\zhaoyingjie f242607587 初始化工程
2024-10-11 10:12:15 +08:00

39 lines
1.1 KiB
C#

using System.Collections;
using System.Collections.Generic;
using TableConfig;
using UnityEngine;
namespace Ether
{
public class ConditionSystem : Singleton<ConditionSystem>
{
public bool GetConditionState(int id)
{
ConditionTable conditionTable = TableProvider.Tables.TbCondition[id];
if (conditionTable == null)
{
return false;
}
switch (conditionTable.Type)
{
case ConditionType.ReceiveTask:
TaskState state = TaskSystem.Inst.GetTaskState(conditionTable.TaskId);
return state == TaskState.Received;
case ConditionType.SuccessTask:
TaskState taskState = TaskSystem.Inst.GetTaskState(conditionTable.TaskId);
return taskState == TaskState.Success;
case ConditionType.HaveProp:
//TODO:获取背包物品判断
break;
default:
break;
}
return true;
}
}
}