Beispiel #1
0
        private void OnTriggerEnter2D(Collider2D other)
        {
            LightController lc = other.GetComponent <LightController>();

            if (lc)
            {
                float weight = lc.GetWeight();
                _void.Expand(weight, _combo);

                _score.SetValue(_score + (int)other.transform.localScale.x * _combo);
                _scoreUi.Display(_score, _combo, other.transform.position);
                _combo.SetValue(_combo + 1);
                _prevCombo = _combo.Value;

                lc.Destroy();
            }
        }