Ejemplo n.º 1
0
    public void InitializeInteraction(Unit interactingWith)
    {
        mainSymbolHolder.Initialize(SaveSystem.currentGameSave.globalVariables.maxDanceMoveSymbols, waitingForInput);
        var unitInteractions = interactingWith.interactions;

        for (var i = 0; i < unitInteractions.Count; i++)
        {
            var           interaction = unitInteractions[i];
            InteractionUI interactionUI;
            if (interactions.Count == i)
            {
                interactionUI = Instantiate(interactionPrefab, interactionsHolder);
                interactions.Add(interactionUI);
            }
            else
            {
                interactionUI = interactions[i];
                interactionUI.gameObject.SetActive(true);
            }

            InitializeInteractionUI(interactionUI, interaction);
        }

        for (var i = unitInteractions.Count; i < interactions.Count; i++)
        {
            interactions[i].gameObject.SetActive(false);
        }

        gameObject.SetActive(true);
        if (clearCutOut != null)
        {
            StopCoroutine(clearCutOut);
        }

        cutOut.rectTransform.localScale = Vector3.one * CutOutMax();
        showCutOut = StartCoroutine(ShowCutOut());
    }
Ejemplo n.º 2
0
 public void Initialize(Sprite symbol, string name, int symbolCount)
 {
     interactionSymbol.sprite = symbol;
     interactionName.text     = name;
     symbolHolder.Initialize(symbolCount);
 }