Exemple #1
0
    public void Change_Deck(int val)
    {
        switch (val)
        {
        case 0:
            if (!Manage_Deck1.gameObject.activeSelf)
            {
                Manage_Deck1.gameObject.SetActive(true);
                Selector.SetActiveDeck(Manage_Deck1);
                Stats.SetActiveDeck(Manage_Deck1);
                DeckContent.content = Manage_Deck1.gameObject.GetComponent <RectTransform>();
            }
            if (Manage_Deck2.gameObject.activeSelf)
            {
                Manage_Deck2.gameObject.SetActive(false);
            }
            if (Manage_Deck3.gameObject.activeSelf)
            {
                Manage_Deck3.gameObject.SetActive(false);
            }
            break;

        case 1:
            if (Manage_Deck1.gameObject.activeSelf)
            {
                Manage_Deck1.gameObject.SetActive(false);
            }
            if (!Manage_Deck2.gameObject.activeSelf)
            {
                Selector.SetActiveDeck(Manage_Deck2);
                Stats.SetActiveDeck(Manage_Deck2);
                Manage_Deck2.gameObject.SetActive(true);
                DeckContent.content = Manage_Deck2.gameObject.GetComponent <RectTransform>();
            }
            if (Manage_Deck3.gameObject.activeSelf)
            {
                Manage_Deck3.gameObject.SetActive(false);
            }
            break;

        case 2:
            if (Manage_Deck1.gameObject.activeSelf)
            {
                Manage_Deck1.gameObject.SetActive(false);
            }
            if (Manage_Deck2.gameObject.activeSelf)
            {
                Manage_Deck2.gameObject.SetActive(false);
            }
            if (!Manage_Deck3.gameObject.activeSelf)
            {
                Selector.SetActiveDeck(Manage_Deck3);
                Stats.SetActiveDeck(Manage_Deck3);
                Manage_Deck3.gameObject.SetActive(true);
                DeckContent.content = Manage_Deck3.gameObject.GetComponent <RectTransform>();
            }
            break;

        default:
            if (!Manage_Deck1.gameObject.activeSelf)
            {
                Selector.SetActiveDeck(Manage_Deck1);
                Stats.SetActiveDeck(Manage_Deck1);
                Manage_Deck1.gameObject.SetActive(true);
                DeckContent.content = Manage_Deck1.gameObject.GetComponent <RectTransform>();
            }
            if (Manage_Deck2.gameObject.activeSelf)
            {
                Manage_Deck2.gameObject.SetActive(false);
            }
            if (Manage_Deck3.gameObject.activeSelf)
            {
                Manage_Deck3.gameObject.SetActive(false);
            }
            break;
        }
    }
    public void Change_Deck(int val)
    {
        switch (val)
        {
        case 0:
            if (!Manage_Deck1.gameObject.activeSelf)
            {
                Manage_Deck1.gameObject.SetActive(true);
                Selector.SetActiveDeck(Manage_Deck1);
                Stats.SetActiveDeck(Manage_Deck1);
            }
            if (Manage_Deck2.gameObject.activeSelf)
            {
                Manage_Deck2.gameObject.SetActive(false);
            }
            if (Manage_Deck3.gameObject.activeSelf)
            {
                Manage_Deck3.gameObject.SetActive(false);
            }
            break;

        case 1:
            if (Manage_Deck1.gameObject.activeSelf)
            {
                Manage_Deck1.gameObject.SetActive(false);
            }
            if (!Manage_Deck2.gameObject.activeSelf)
            {
                Selector.SetActiveDeck(Manage_Deck2);
                Stats.SetActiveDeck(Manage_Deck2);
                Manage_Deck2.gameObject.SetActive(true);
            }
            if (Manage_Deck3.gameObject.activeSelf)
            {
                Manage_Deck3.gameObject.SetActive(false);
            }
            break;

        case 2:
            if (Manage_Deck1.gameObject.activeSelf)
            {
                Manage_Deck1.gameObject.SetActive(false);
            }
            if (Manage_Deck2.gameObject.activeSelf)
            {
                Manage_Deck2.gameObject.SetActive(false);
            }
            if (!Manage_Deck3.gameObject.activeSelf)
            {
                Selector.SetActiveDeck(Manage_Deck3);
                Stats.SetActiveDeck(Manage_Deck3);
                Manage_Deck3.gameObject.SetActive(true);
            }
            break;

        default:
            if (!Manage_Deck1.gameObject.activeSelf)
            {
                Selector.SetActiveDeck(Manage_Deck1);
                Stats.SetActiveDeck(Manage_Deck1);
                Manage_Deck1.gameObject.SetActive(true);
            }
            if (Manage_Deck2.gameObject.activeSelf)
            {
                Manage_Deck2.gameObject.SetActive(false);
            }
            if (Manage_Deck3.gameObject.activeSelf)
            {
                Manage_Deck3.gameObject.SetActive(false);
            }
            break;
        }
    }