示例#1
0
        public static void ChangeDrak(this GameObject go, bool isChange = true, GreyItem.GreyType type = FCGreyItem.GreyType.GT_ForbidButton)
        {
            GreyItem gi = SceneManager.instance.AddComponent <GreyItem>(go);

            if (isChange)
            {
                gi.PlayDrak(Color.gray, type);
            }
            else
            {
                gi.Clear();
            }
        }
示例#2
0
        public static void ChangeGreyR(this GameObject go, bool isChange = true, GreyItem.GreyType type = FCGreyItem.GreyType.GT_ForbidButton)
        {
            GreyItem gi = SceneManager.instance.AddComponent <GreyItem>(go);

            if (isChange)
            {
                if (FUniversalFunction.IsContainSameType((int)type, (int)GreyItem.GreyType.GT_Sprite))
                {
                    gi.PlayGray(SceneManager.LoadPrefab <Material>(ResConfig.MATERIAL_GREY + "S"), type);
                }
                else
                {
                    gi.PlayGray(SceneManager.LoadPrefab <Material>(ResConfig.MATERIAL_GREY), type);
                }
            }
            else
            {
                gi.Clear();
            }
        }