public void Drop() { _targetHeight = 0; float distance = Vector3.Distance(_piecePosition, transform.localPosition); if (distance < 20) { transform.localPosition = _piecePosition; _settedOnGoodPlace = true; if (checkSuccess()) { successBehaviours(); } else { SoundsSmanager.PlaySingle(SoundsSmanager.correctSound); } } else { SoundsSmanager.PlaySingle(SoundsSmanager.wrongSound); _replace = true; } }
void successBehaviours() { SoundsSmanager.PlaySingle(SoundsSmanager.successSound); PuzzleSceneUISmanager.displaySuccessMessage(); }