예제 #1
0
        public static ConfigAvatarShowInfo GetAvatarShowInfo(AvatarDataItem avatar, MiscData.PageInfoKey pageKey, string tabName)
        {
            ConfigTabAvatarTransformInfo info2;
            ConfigPageAvatarShowInfo     pageAvatarShowInfo = MiscData.GetPageAvatarShowInfo(pageKey);
            string avatarRegistryKey = avatar.AvatarRegistryKey;

            char[] separator = new char[] { '_' };
            string key       = avatarRegistryKey.Split(separator)[0];

            if (pageAvatarShowInfo.AvatarTabTransformInfos.ContainsKey(avatarRegistryKey))
            {
                info2 = pageAvatarShowInfo.AvatarTabTransformInfos[avatarRegistryKey];
            }
            else if (pageAvatarShowInfo.AvatarTabTransformInfos.ContainsKey(key))
            {
                info2 = pageAvatarShowInfo.AvatarTabTransformInfos[key];
            }
            else
            {
                info2 = pageAvatarShowInfo.AvatarTabTransformInfos["Default"];
            }
            string str3 = tabName + "_" + avatar.avatarID;

            if (info2.AvatarShowInfos.ContainsKey(str3))
            {
                return(info2.AvatarShowInfos[str3]);
            }
            if (info2.AvatarShowInfos.ContainsKey(tabName))
            {
                return(info2.AvatarShowInfos[tabName]);
            }
            return(info2.AvatarShowInfos["Default"]);
        }
예제 #2
0
        public static void Create3DAvatarByPage(AvatarDataItem avatar, MiscData.PageInfoKey pageKey, string tabName = "Default")
        {
            ConfigPageAvatarShowInfo     pageAvatarShowInfo = MiscData.GetPageAvatarShowInfo(pageKey);
            ConfigAvatarShowInfo         info2 = GetAvatarShowInfo(avatar, pageKey, tabName);
            List <Avatar3dModelDataItem> body  = new List <Avatar3dModelDataItem> {
                new Avatar3dModelDataItem(avatar, info2.Avatar.Position, info2.Avatar.EulerAngle, pageAvatarShowInfo.ShowLockViewIfLock)
            };

            Singleton <NotifyManager> .Instance.FireNotify(new Notify(NotifyTypes.CreateAvatarUIModels, body));

            GameObject obj2 = GameObject.Find("LookAt");

            if (obj2 != null)
            {
                obj2.transform.position    = info2.LookAt.Position;
                obj2.transform.eulerAngles = info2.LookAt.EulerAngle;
            }
        }