Пример #1
0
 public void Entrar()
 {
     if (!string.IsNullOrEmpty(inputFieldstudent.text))
     {
         StartCoroutine(getData(inputFieldstudent.text));
         PanelLogin.SetActive(false);
         PanelMenu.SetActive(true);
     }
 }
Пример #2
0
    IEnumerator StartingGame()
    {
        yield return(new WaitForSeconds(0.1f));

        Shield shield = new Shield(5f, 3f, 2f, 0.15f);

        Spells.Add(new Spell("Fireball", 5, new Dictionary <FlyingParam, int>()
        {
            { FlyingParam.Speed, 80 }, { FlyingParam.Damage, 10 }, { FlyingParam.Size, 12 }
        }, new Dictionary <AfterHitParam, int>()
        {
            { AfterHitParam.Damage, 10 }, { AfterHitParam.Time, 2 }
        }));
        Spells.Add(new Spell("Ice", 10, new Dictionary <FlyingParam, int>()
        {
            { FlyingParam.Speed, 120 }, { FlyingParam.Damage, 10 }, { FlyingParam.Size, 10 }
        }, new Dictionary <AfterHitParam, int>()
        {
            { AfterHitParam.Damage, 20 }, { AfterHitParam.Time, 2 }, { AfterHitParam.SlowDown, 1 }
        }));

        Vial vial = new Vial("Minor Mana Potion", new Dictionary <VialParam, int>()
        {
            { VialParam.ManaAdd, 10 }
        }, SpriteManager.ManaPotion);

        Vials.Add(vial);
        Vials.Add(new Vial("Minor Health Potion", new Dictionary <VialParam, int>()
        {
            { VialParam.HealthAdd, 10 }
        }, SpriteManager.HealthPotion));

        List <Vial> rightVials = new List <Vial>();

        rightVials.Add(new Vial("Double bonus", new Dictionary <VialParam, int>()
        {
            { VialParam.ManaAdd, 100 }, { VialParam.HealthAdd, 100 }
        }, SpriteManager.HealthPotion));
        rightVials.Add(new Vial("Faster mana recovery", new Dictionary <VialParam, int>()
        {
            { VialParam.HealthAdd, 100 }
        }, SpriteManager.ManaPotion));

        Mage ivaAllesi = new Mage("Iva Alessi", MageClass.Thenacurviat, false);

        ivaAllesi.LeftHand   = Spells[0];
        ivaAllesi.RightHand  = Spells[1];
        ivaAllesi.Shield     = shield;
        ivaAllesi.LeftVials  = Vials;
        ivaAllesi.RightVials = rightVials;

        Mage kelThuzad = new Mage("Kel Thuzad", MageClass.Creator, true);

        kelThuzad.LeftHand  = Spells[1];
        kelThuzad.RightHand = Spells[0];
        kelThuzad.Shield    = shield;
        kelThuzad.LeftVials = Vials;

        Player = new Player(ivaAllesi, new List <Spell>()
        {
            Spells[0], Spells[1]
        });
        Enemy = new Player(kelThuzad, new List <Spell>()
        {
            Spells[0], Spells[1]
        });
        Enemy.SetAi(new Ai(0.9f, 5.9f, 0.9f));

        PanelMenu.SetActive(false);
        PanelMinigame.SetActive(true);

        Bonus b = new Bonus(vial, SpriteManager.HealthBonusOnMap, SpriteManager.HealthBonusOnMapShadow, true);

        MinigameParameters minigameParameters = new MinigameParameters(new BonusParameters(1, 1, 3, 5, new List <BonusConfig>()
        {
            new BonusConfig(b, 0.8f), new BonusConfig(null, 0.1f)
        }));

        PanelMinigame.GetComponent <PanelMinigame>().Prepare(Player, Enemy, minigameParameters);
    }
Пример #3
0
 void Awake()
 {
     Me = this;
     PanelMinigame.SetActive(false);
     PanelMenu.SetActive(true);
 }
Пример #4
0
 public void actMenu()
 {
     PanelMenu.SetActive(true);
 }
Пример #5
0
 public void IrAr()
 {
     PanelAR.SetActive(true);
     PanelLogin.SetActive(false);
     PanelMenu.SetActive(false);
 }
Пример #6
0
 void ItenClicked(int itenIndex)
 {
     Debug.Log("Item: " + itenIndex);
     PanelMenu.SetActive(false);
     BtnVolver.SetActive(true);
 }