private void Update() { if (_TaskSource_M != null) { S_Task ST = _TaskSource_M.GetTask(); if (ST != null) { if (ST.TimeEnding()) { SET_CONT_ACT(true); _Sprite_Timer.fillAmount = ST.TimerEndingStatus(); } else { SET_CONT_ACT(false); } _Anim.SetBool(ANIM_ID_Failed, ST.IsFailed()); int CouldSub = ST.CouldSubTask(); _Anim.SetInteger(ANIM_ID_COULD, CouldSub); if (CouldSub > 0) { _Task_E1.SetTask(ST.GetSubTask(0)); } if (CouldSub > 1) { _Task_E2.SetTask(ST.GetSubTask(1)); } if (CouldSub > 2) { _Task_E3.SetTask(ST.GetSubTask(2)); } return; } _Anim.SetInteger(ANIM_ID_COULD, 0); SET_CONT_ACT(false); return; } _Anim.SetInteger(ANIM_ID_COULD, 0); SET_CONT_ACT(false); }
public void E_Chest(S_A_Chest Ch_) { if (_Task != null) { S_Task_Element SE = _Task.GetSubTask(_Task.CouldSubTask() - 1); if (Ch_._ID == SE._Chest._ID) { SE._Could--; } else { _Task.Failed(); } if (SE._Could <= 0) { _Task.DeleteTask(_Task.CouldSubTask() - 1); } } }