Exemplo n.º 1
0
    private void CreateMythDeck()
    {
        foreach (var round in _currentBoss.myths)
        {
            List <Myth> result = new List <Myth> ();
            for (int type = 0; type < round.Value.Count; type++)
            {
                for (int count = 0; count < round.Value [type]; count++)
                {
                    Myth item = _myths.Where(myth => myth.type == type + 1).OrderBy(o => UnityEngine.Random.value).FirstOrDefault();
                    result.Add(item);
                    _myths.Remove(item);
                }
            }
            result = result.OrderBy(x => UnityEngine.Random.value).ToList( );
            activeMythses.AddRange(result);
        }

        string log = "";

        foreach (var item in activeMythses)
        {
            log += item.ToString() + "\n";
        }
        Debug.Log(log);
    }
Exemplo n.º 2
0
 void OnMouseUpAsButton()
 {
     if (!EventSystem.current.IsPointerOverGameObject())
     {
         Myth myth = GenerateMyth();
         title.text      = myth.source + ": " + myth.name;
         content.text    = myth.content;
         scrollbar.value = 1f;
         ShowUI();
     }
 }
Exemplo n.º 3
0
        public async void Selecteddeckinfo()
        {
            switch (Global.DeckNumber)
            {
            case 1:

                GotDeck.SetDeckInfo();
                break;

            case 2:

                LordDeck.SetDeckInfo();
                break;

            case 3:

                HarryDeck.SetDeckInfo();
                break;

            case 4:

                FriendsDeck.SetDeckInfo();
                break;

            case 5:

                Animals.SetDeckInfo();
                break;

            case 6:
                Myth.SetDeckInfo();
                break;

            case 7:
                People.SetDeckInfo();
                break;

            default:
                await Navigation.PushAsync(new GameSelectionPage());

                break;
            }
        }