コード例 #1
0
ファイル: BuffClass.cs プロジェクト: kkaldas/UGJ-2020-1
 public override void Execute()
 {
     // Technically it improves also unblocked cards, but let's not show them yet
     customPopUpOpener.OpenDisplayingUnblockedCardsOfClass(
         title: "You Bought Equips",
         ColorHexCodes.Paint(" ALL YOUR " + classe + " CARDS WILL BE BUFFED. PLEASE CHOOSE:", ClassInfo.GetColorOfClass(classe)),
         confirmBtnMessage: "+1 Vitality",
         // NOTE: cancel effect was commented out because I needed to modify
         // OpenDisplayingUnblockedCardsOfClass method and this ocurrence was not being used
         // cancelBtnMessage: "+1 Attack Power",
         onConfirm: ImproveVitalityThenSeeMap,
         // onCancel: ImproveAttackPowerThenSeeMap,
         preMadeAudioFactory.CreateVictoryAudioRequest(assignor: gameObject),
         classe
         );
 }
コード例 #2
0
    public override void ExecuteAction()
    {
        if (!quit)
        {
            if (timer < 1.5f)
            {
                timer += TimeFacade.DeltaTime;
            }
            else
            {
                if (popUpOpener.AllPopUpsAreClosed())
                {
                    timer = 0;

                    if (winnerFactory == playerBattleStatesFactory)
                    {
                        switch (CurrentBattleInfo.rewardType)
                        {
                        case BattleReward.NONE:
                        {
                            customPopUpOpener.OpenWithBGM(
                                title: "Congratulations",
                                warningMessage: "You beat those guys. What are you going to do now?",
                                confirmBtnMessage: "Look the map",
                                cancelBtnMessage: "Nothing",
                                onConfirm: QuitBattleAndGoToMap,
                                onCancel: () => { cricketsAudioRequest.RequestPlaying(); },
                                victoryBGMRequest
                                );
                        }
                        break;

                        case BattleReward.CARDS_OF_CLASS:
                        {
                            sceneCanvas.SetActive(false);
                            customPopUpOpener.OpenDisplayingUnblockedCardsOfClass(
                                title: "You beat a Master",
                                warningMessage: ColorHexCodes.BeginWhite + "What about making some recruiting?" + ColorHexCodes.End +
                                ColorHexCodes.Paint(" YOU JUST GOT ONE OF EACH " + enemyDeckClass + " CARDS TO YOUR COLLECTION. ", deckColor),
                                confirmBtnMessage: "Awesome",
                                onConfirm: GiveUnblockedCardsOfClassThenSeeMap,
                                victoryBGMRequest,
                                enemyDeckClass
                                );
                        }
                        break;

                        case BattleReward.SPECIFIC_CARD:
                        {
                            sceneCanvas.SetActive(false);
                            Card[] reward = EditorMadeDeckBuilder.CreateEditorMadeDeckBuilder(rewardDeckName).GetDeck();

                            CustomPopUp.OnBtnClicked onbtn = () => { GiveRewardDeckThenSeeMap(reward); };

                            customPopUpOpener.OpenDisplayingRewardCards(
                                title: "You win!",
                                warningMessage: ColorHexCodes.BeginWhite + "You beat the card challenge." + ColorHexCodes.End +
                                ColorHexCodes.Paint(" YOU GOT A CARD ", deckColor),
                                confirmBtnMessage: "Awesome",
                                onConfirm: onbtn,
                                victoryBGMRequest,
                                cards: reward
                                );
                        }
                        break;
                        }
                    }
                    else
                    {
                        MapsCache.SpotToClearAndLevelUpIfPlayerWins = null;
                        customPopUpOpener.OpenWithBGM(
                            title: "You've lost the battle",
                            warningMessage: "The enemy start to search you fallen card's pockets",
                            confirmBtnMessage: "Go back in time",
                            cancelBtnMessage: "Sit and cry",
                            GoBackInTime,
                            () => { cryingAudioRequest.RequestPlaying(); },
                            defeatBGMRequest
                            );
                    }
                }
                else
                // Some pop up is oppened
                {
                    timer = 0.0f;
                }
            }
        }
    }