Ejemplo n.º 1
0
    private void OnMouseUpAsButton()
    {
        var scores = _scoreScaler * transform.localScale.x * _scaleSpeedMax;

        GameStarter.SetScore(scores);
        Instantiate(_chpokParticle, transform.localPosition, transform.localRotation);
        Destroy(gameObject);
    }
Ejemplo n.º 2
0
 void Update()
 {
     transform.localScale = Vector3.Lerp(transform.localScale, _maxScale, Random.Range(_scaleSpeedMin, _scaleSpeedMax) * Time.deltaTime);
     if (transform.localScale.x > _maxScale.x * 0.9f)
     {
         var scores = -(_scoreScaler * transform.localScale.x);
         GameStarter.SetScore(scores);
         Instantiate(_chpokParticle, transform.localPosition, transform.localRotation);
         Destroy(gameObject);
     }
 }