using System.Collections; using System.Collections.Generic; using TableConfig; using UnityEngine; namespace Ether { public class ConditionSystem : Singleton { 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; } } }