using UnityEngine;

namespace ftt.Puzzles
{
    public class MasksPuzzle : MonoBehaviour
    {
        [SerializeField] MaskComponent[] masks;
        [SerializeField] MoveablePlatform gameobjectToMove;

        public void ValidatePositions()
        {
            if (gameobjectToMove.IsActivated) { return; }

            foreach (MaskComponent mask in masks)
            {
                if (!mask.IsInCorrectPosition)
                { return; }
            }

            gameobjectToMove.MovePlatform();
        }
    }
}