Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
 void successBehaviours()
 {
     SoundsSmanager.PlaySingle(SoundsSmanager.successSound);
     PuzzleSceneUISmanager.displaySuccessMessage();
 }