Example #1
0
        private void OnPrizeChestSelectChanged(UButtonGroupItem oldItem, UButtonGroupItem newItem)
        {
            ClearContainer(chestObjContainer);
            if (newItem)
            {
                PrizeChestInfo info = newItem.GetComponent <PrizeChestInfo>();
                if (info)
                {
                    if (chestObjContainer == null)
                    {
                        GameObject go = new GameObject();
                        go.name           = "PrizeChestContainer";
                        chestObjContainer = go.transform;
                    }

                    GameObject parent = new GameObject();
                    parent.name = "PrizeItem";
                    parent.transform.SetParent(chestObjContainer);
                    parent.transform.localPosition = Vector3.zero;

                    SceneEffectParamBase effectParam = new SceneEffectParamBase(info.PrizeChestConfig.nNormalEffect, parent.transform);
                    SceneEffectManager.Instance.CreateSceneEffect(ref effectParam);

                    SceneEffectParamBase bgEffectParam = new SceneEffectParamBase(info.PrizeChestConfig.nBgEffectID, parent.transform);
                    SceneEffectManager.Instance.CreateSceneEffect(ref bgEffectParam);

                    prizeChestItem.Clear();
                    prizeChestItem.SetData(this, info.PrizeChestConfig.nChestId, info.PrizeChestConfig.strChestName, info.PrizeChestCount);
                }
            }
        }
Example #2
0
        private void OnselectedServerChanged(UButtonGroupItem oldItem, UButtonGroupItem newItem)
        {
            DistrictInfo districtInfo = newItem.GetComponent <DistrictInfo>();

            if (districtInfo != null)
            {
                tempServer.nGroup    = districtInfo.GetGroupID();
                tempServer.nDistrict = districtInfo.GetDistrictID();
                tempServer.nServer   = districtInfo.GetServerID();
            }
        }
Example #3
0
        public void OnTabGroupChanged(UButtonGroupItem oldItem, UButtonGroupItem newItem)
        {
            if (newItem == null)
            {
                return;
            }

            if (oldItem == null)
            {
                oldItem = emoticonTabGroup.GetItemAt(0);
                if (oldItem == null)
                {
                    return;
                }
            }

            emoticonTabPageRTList[oldItem.GroupIndex].gameObject.SetActive(false);
            emoticonTabPageRTList[newItem.GroupIndex].gameObject.SetActive(true);

            oldItem.GetComponent <Image>().color = new Color(1, 1, 1, 0);
            newItem.GetComponent <Image>().color = new Color(1, 1, 1, 1);
        }