Example #1
0
 private void Finish()
 {
     if (!_finished)
     {
         // Remove gold from treasure
         if (_target != null && _target.value > 0)
         {
             _target.value -= Mathf.Min(10, _target.value);
             _target.CheckValue();
         }
         // Die
         this.DOKill();
         _finished = true;
         StartCoroutine(FinishRoutine());
     }
 }