Exemple #1
0
        public void VariantButtonsAnimationDisplay()
        {
            if (!EventSystem.current.currentSelectedGameObject.GetComponent <VariantButtonAnim>().VariantButtonAnimBool)
            {
                for (int i = 0; i < ItemButtons.transform.childCount; i++)
                {
                    ItemButtons.transform.GetChild(i).GetComponent <VariantButtonAnim>().VariantButtonAnimBool = false;
                }

                EventSystem.current.currentSelectedGameObject.GetComponent <VariantButtonAnim>().VariantButtonAnimBool = true;
                if (!VariantButtons.GetComponent <Animator>().GetBool("Play"))
                {
                    VariantButtons.GetComponent <Animator>().SetBool("Play", !VariantButtons.GetComponent <Animator>().GetBool("Play"));
                }
            }
            else
            {
                VariantButtons.GetComponent <Animator>().SetBool("Play", !VariantButtons.GetComponent <Animator>().GetBool("Play"));
            }
        }
Exemple #2
0
 public void GetItemPrefabInVariant()
 {
     actualPrefab = EventSystem.current.currentSelectedGameObject.GetComponent <CreatorButtonsVariantPrefab>().ItemPrefab;
     VariantButtons.GetComponent <Animator>().SetBool("Play", !VariantButtons.GetComponent <Animator>().GetBool("Play"));
 }