Esempio n. 1
0
    private void PrepareLoading()
    {
        PanelMainMenu.SetActive(false);
        PanelBeforeMission.SetActive(false);
        PanelAfterMission.SetActive(false);
        PanelLoadingMission.SetActive(false);
        PanelLoading.SetActive(true);
        PanelMissionFailed.SetActive(false);
        PanelMinigame.SetActive(false);
        PanelSettings.SetActive(false);

        PanelLoading.GetComponent <PanelLoading>().TextTop = "Loading data";
        PanelLoading.GetComponent <PanelLoading>().TextTap = "";
        StartCoroutine(LoadDataCoroutine());
    }
    void OnTriggerEnter(Collider other)
    {
        PanelMage pm = other.gameObject.transform.parent.GetComponent <PanelMage>();

        if (pm != null)
        {
            pm.TakeDamage(Spell.AfterHitParams[AfterHitParam.Damage]);
            BlowUp();
        }
        PanelMinigame pmini = other.gameObject.GetComponent <PanelMinigame>();

        if (pmini != null)
        {
            if (pmini.LeftCollider == other || pmini.RightCollider == other)
            {
                Direction.x = -Direction.x;
                if (Bounced)
                {
                    BlowUp();
                }
                Bounced = true;
            }

            if (pmini.TopCollider == other || pmini.BottomCollider == other)
            {
                BlowUp();
            }
        }
        Bullet b = other.GetComponent <Bullet>();

        if (b != null)
        {
            BlowUp();
            b.BlowUp();
        }

        PanelFounder pf = other.transform.parent.GetComponent <PanelFounder>();

        if (pf != null)
        {
            BlowUp();
            Debug.Log("bonus found");
            pf.TakeBy(Caster);
        }
    }
Esempio n. 3
0
    private IEnumerator WaitingForResultsCoroutine(WWW www, Mission Mission, Dictionary <ScoreType, Result> ActualResults)
    {
        MissionStatus ms = Mission.GetStatus(ActualResults);

        yield return(new WaitForSeconds(2f));

        if (ms == MissionStatus.Success)
        {
            PanelAfterMission.SetActive(true);
            PanelAfterMission.GetComponent <PanelAfterMission>().Prepare(Mission, ActualResults);
        }
        else
        {
            PanelMissionFailed.SetActive(true);
            PanelMissionFailed.GetComponent <PanelMissionFailed>().Prepare(Mission, ActualResults);
        }
        PanelMinigame.SetActive(false);
        yield return(www);

        if (ms == MissionStatus.Success)
        {
            PanelAfterMission.GetComponent <PanelAfterMission>().UpdateText(www);
        }
    }
Esempio n. 4
0
    internal void Prepare()
    {
        AvatarModel am = new AvatarModel(Card.Druid, false, null);

        Me = this;
        PanelInformation.SetActive(true);

        List <List <TileTemplate> > templates = new List <List <TileTemplate> >();

        for (int i = 0; i < 3; i++)
        {
            List <TileTemplate> col = new List <TileTemplate>();
            for (int j = 0; j < 4; j++)
            {
                TileTemplate tt = new TileTemplate();
                col.Add(tt);
            }
            templates.Add(col);
        }

        PanelBoardBack.GetComponent <ScrollableList>().Build(templates);

        templates[2][2].AddTemplate(Card.Druid);
        templates[0][1].AddTemplate(Card.Shaman);

        PanelBoardFront.GetComponent <ScrollableList>().Build(templates);

        PanelAvatar lasiaAvatar = PanelBoardFront.GetComponent <ScrollableList>().ElementsToPut[2 * 4 + 2].GetComponent <PanelTile>().PanelAvatar.GetComponent <PanelAvatar>();
        AvatarModel lasiaModel  = lasiaAvatar.Model;

        List <Card> all = new List <Card>();

        all.Add(Card.AncestralHealing);
        all.Add(Card.StonetuskBoar);
        all.Add(Card.RiverCrocolisk);
        all.Add(Card.Wolfrider);
        all.Add(Card.StormwindKnight);
        all.Add(Card.StormpikeCommando);
        all.Add(Card.RecklessRocketeer);
        all.Add(Card.WarGolem);
        all.Add(Card.Nightblade);
        all.Add(Card.LordOfTheArena);
        all.Add(Card.Archmage);
        all.Add(Card.GurubashiBerserker);
        all.Add(Card.DarkscaleHealer);
        all.Add(Card.BootyBayBodyguard);
        all.Add(Card.OgreMagi);
        all.Add(Card.OasisSnapjaw);
        all.Add(Card.DragonlingMechanic);
        all.Add(Card.SilverbackPatriarch);
        all.Add(Card.RaidLeader);
        all.Add(Card.MagmaRager);
        all.Add(Card.IronforgeRifleman);
        all.Add(Card.NoviceEngineer);
        all.Add(Card.Moonfire);
        all.Add(Card.DalaranMage);
        all.Add(Card.FrostwolfGrunt);
        all.Add(Card.GoldshireFootman);
        all.Add(Card.VoodooDoctor);
        all.Add(Card.ElvenArcher);
        all.Add(Card.MurlocTidehunter);
        all.Add(Card.HealingTouch);
        all.Add(Card.Innervate);
        all.Add(Card.MarkOfTheWild);
        all.Add(Card.IronfurGrizzly);
        all.Add(Card.SavageRoar);
        all.Add(Card.Claw);
        all.Add(Card.GnomishInventor);
        all.Add(Card.ChillwindYeti);
        all.Add(Card.Sprint);
        all.Add(Card.Flamestrike);
        all.Add(Card.CoreHound);
        all.Add(Card.KoboldGeomancer);
        all.Add(Card.RockbiterWeapon);
        all.Add(Card.Swipe);
        all.Add(Card.MindControl);
        all.Add(Card.Starfire);
        all.Add(Card.FlametongueTotem);
        all.Add(Card.RazorfenHunter);
        all.Add(Card.SenjinShieldmasta);
        all.Add(Card.Bloodlust);
        all.Add(Card.BoulderfishOgre);
        all.Add(Card.FireElemental);
        all.Add(Card.FrostwolfWarlord);
        all.Add(Card.Hex);
        all.Add(Card.StormwindChampion);
        all.Add(Card.ShatteredSunCleric);
        all.Add(Card.BloodfenRaptor);
        all.Add(Card.Thrallmar);
        all.Add(Card.Wisp);
        all.Add(Card.IronbarkProtector);

        all.Add(Card.KillTheBullies);
        all.Add(Card.BubblingVolcano);
        all.Add(Card.MagicArrow);

        all.RemoveAll(x => x.Cost > 5);

        all.Shuffle();

        lasiaModel.Deck = all.GetRange(0, 15);
        lasiaModel.PullCardFromDeck();
        lasiaModel.PullCardFromDeck();

        PanelAvatar dementorAvatar = PanelBoardFront.GetComponent <ScrollableList>().ElementsToPut[1].GetComponent <PanelTile>().PanelAvatar.GetComponent <PanelAvatar>();
        AvatarModel dementorModel  = dementorAvatar.Model;

        all.Shuffle();
        dementorModel.Deck = all.GetRange(0, 15);
        dementorModel.Hand.Add(Card.ManaCrystal);
        dementorModel.PullCardFromDeck();
        dementorModel.PullCardFromDeck();
        dementorModel.PullCardFromDeck();

        MyModel     = lasiaModel;
        EnemysModel = dementorModel;

        ActualTurnModel = EnemysModel;
        EndTurn();
        RevalidateEffects();
    }