Exemple #1
0
    public bool Shake()  //Candidate for cleanup. Should be clearer why this returns a bool to PlayerHandInteractions
    {
        _accumulatedShakes++;
        _timer = _secondsBeforeShakeCountReset;

        if (_accumulatedShakes >= _shakesBeforeExploding)
        {
            Instantiate(_explosionPrefab, transform.position, Quaternion.identity);
            _orb.Disable();
            return(true);            //Orb was destroyed by the shake.
        }
        else
        {
            return(false);            //Orb was NOT destroyed by the shake.
        }
    }
Exemple #2
0
 public void Combine()
 {
     _orb.Disable();
 }