Exemple #1
0
    private void Update()
    {
        if (_TaskSource_M != null)
        {
            S_Task ST = _TaskSource_M.GetTask();
            if (ST != null)
            {
                if (ST.TimeEnding())
                {
                    _Ligth_red.enabled  = true;
                    _Ligth_Blue.enabled = false;
                    return;
                }

                _Ligth_Blue.enabled = true;
                _Ligth_red.enabled  = false;
                return;
            }

            _Ligth_Blue.enabled = false;
            _Ligth_red.enabled  = false;
        }

        _Ligth_Blue.enabled = false;
        _Ligth_red.enabled  = false;
    }
Exemple #2
0
    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);
    }