コード例 #1
0
ファイル: CreatorHUD.cs プロジェクト: Secuii/LaserGame
        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"));
            }
        }
コード例 #2
0
ファイル: CreatorHUD.cs プロジェクト: Secuii/LaserGame
 public void GetItemPrefabInVariant()
 {
     actualPrefab = EventSystem.current.currentSelectedGameObject.GetComponent <CreatorButtonsVariantPrefab>().ItemPrefab;
     VariantButtons.GetComponent <Animator>().SetBool("Play", !VariantButtons.GetComponent <Animator>().GetBool("Play"));
 }