Exemple #1
0
    internal void SetLevel(DLevel level, Action onClick)
    {
        txt.text = level.id;

        btn.onClick.RemoveAllListeners();
        btn.onClick.AddListener(() =>
        {
            onClick();
        });
    }
Exemple #2
0
    private void OnBuildButton(UILevelButton levelBtn, DLevel level)
    {
        levelBtn.SetLevel(level, () =>
        {
            selectedLevel = level;

            // limit number of selected cards to max size specified by level
            for (int i = selectedCards.Count - 1; i >= 0; i--)
            {
                if (i > selectedLevel.deckSize - 1)
                {
                    var card = selectedCards[i];
                    selectedCards.Remove(card);
                    inventoryCards.Add(card);
                }
            }

            animations.Play("menu_slide_cards");
        });
    }
Exemple #3
0
    public void Setup(DLevel level, List <Card> deckCards)
    {
        this.level = level;

        stageRandomiser.Randomise();

        SetupSong(level.id);
        SetupDeck(deckCards);

        SetupHand();

        currentAngerAmount = level.startAnger;

        SetupScore(level.startA, level.startB, level.startC, level.scoreA, level.scoreB, level.scoreC, level.startAnger, level.angerLimit);

        currentTime = 0;

        menu_Game.Reset();

        uiTimeline.Setup(song);
        uiTimeline.onMissedNote += OnMissedNote;

        gameStarted = true;
    }