Esempio n. 1
0
    public bool CheckIfPointScored(int num, SmallRadius pointcenter, BigRadius radius)
    {
        _NumberTouched = num;
        // Debug.Log("nm: "+num);
        //  Debug.Log("cn: "+_CurrentNumber);
        //  Debug.Log(num == _CurrentNumber);
        radius.HasSucceeded = true;
        if (num == _CurrentNumber)
        {
            Debug.Log("SCORED");
            _CurrentNumber += 1;
            _CurrentAmount -= 1;
            _TargetManager.AddSuccess();
            pointcenter.TurnOn();
            // pointcenter.gameObject.SetActive(false);

            if (_CurrentAmount <= 0)
            {
                this.gameObject.SetActive(false);
                _TargetManager.ChangePattern();
            }
            return(true);
        }
        else
        {
            if (!pointcenter.WasActivated)
            {
                _TargetManager.AddOrderError();
            }

            return(false);
        }//else: the user went in wrong order
    }