Exemple #1
0
 public void Awake()
 {
     _letterNumbersSequence = new int[16];
     _anim            = GetComponent <Animator>();
     _selectedLetters = new List <PentaLetter>();
     _pool            = FindObjectOfType <PoolOfAll>();
 }
Exemple #2
0
    //private int _pentagramCounter;
    //private Pentagram[] _pentagrams;

    private void Awake()
    {
        _pentaLoader = new PentaLoader();

        _liner         = FindObjectOfType <Liner>();
        _pool          = GetComponentInChildren <PoolOfAll>();
        _scrollManager = GetComponentInChildren <ScrollManager>();


        if (_liner == null || _pool == null || _scrollManager == null)
        {
            Debug.LogError("PuzzleManager couldn't find something.");
        }

        _selectedWordText.text = "";

        Scroll[] pents = FindObjectsOfType <Scroll>();
        foreach (Scroll pent in pents)
        {
            pent.AddSpellActivatedCallBack(OnWordActivation);
            pent.AddSelectedWordChangedCallback(OnSelectedWordChanged);
        }
    }