Exemple #1
0
    private void OnMouseDown()
    {
        Debug.Log("click");
        ChampionBox champRef = champBoxRef.GetComponent <ChampionBox>();

        champBoxRef.GetComponent <ChampionBox>().more = false;
        StartCoroutine(champRef.DisplayChampions1(0f));
        Instantiate(menuButton);
        Instantiate(moreButton);
        SpriteRenderer[] sprites = GetComponentsInChildren <SpriteRenderer>();

        for (int i = 0; i < sprites.Length; i++)
        {
            sprites[i].enabled = false;
        }
        Destroy(gameObject, 0.1f);
    }
Exemple #2
0
    private void OnMouseDown()
    {
        if (!championBox.GetComponent <ChampionBox>().more)
        {
            championBox.GetComponent <ChampionBox>().more = true;
        }
        else
        {
            championBox.GetComponent <ChampionBox>().more = false;
        }
        GameObject[] boxToDest = GameObject.FindGameObjectsWithTag("Box");
        foreach (GameObject box in boxToDest)
        {
            Destroy(box);
        }
        ChampionBox champRef = championBox.GetComponent <ChampionBox>();

        StartCoroutine(champRef.DisplayChampions1(0f));
    }