当前位置: 首页>>代码示例>>C#>>正文


C# AvatarAppearance.SetDefaultWearables方法代码示例

本文整理汇总了C#中AvatarAppearance.SetDefaultWearables方法的典型用法代码示例。如果您正苦于以下问题:C# AvatarAppearance.SetDefaultWearables方法的具体用法?C# AvatarAppearance.SetDefaultWearables怎么用?C# AvatarAppearance.SetDefaultWearables使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AvatarAppearance的用法示例。


在下文中一共展示了AvatarAppearance.SetDefaultWearables方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: setup

        public void setup()
        {
            AgentId = UUID.Random();
            BaseFolder = UUID.Random();
            CapsPath = "http://www.opensimulator.org/Caps/Foo";
            ChildrenCapsPaths = new Dictionary<ulong, string>();
            ChildrenCapsPaths.Add(ulong.MaxValue, "http://www.opensimulator.org/Caps/Foo2");
            firstname = "CoolAvatarTest";
            lastname = "test";
            StartPos = new Vector3(5,23,125);

            SecureSessionId = UUID.Random();
            SessionId = UUID.Random();

            AvAppearance = new AvatarAppearance(AgentId);
            AvAppearance.SetDefaultWearables();
            VisualParams = new byte[218];
            AvAppearance.SetDefaultParams(VisualParams);

            //body
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_HEIGHT] = 155;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_THICKNESS] = 00;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_BODY_FAT] = 0;

            //Torso
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_TORSO_MUSCLES] = 48;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_NECK_THICKNESS] = 43;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_NECK_LENGTH] = 255;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_SHOULDERS] = 94;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_CHEST_MALE_NO_PECS] = 199;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_ARM_LENGTH] = 255;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_HAND_SIZE] = 33;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_TORSO_LENGTH] = 240;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_LOVE_HANDLES] = 0;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_BELLY_SIZE] = 0;

            // legs
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_LEG_MUSCLES] = 82;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_LEG_LENGTH] = 255;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_HIP_WIDTH] = 84;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_HIP_LENGTH] = 166;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_BUTT_SIZE] = 64;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_SADDLEBAGS] = 89;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_BOWED_LEGS] = 127;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_FOOT_SIZE] = 45;


            // head 
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_HEAD_SIZE] = 255;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_SQUASH_STRETCH_HEAD] = 0; // head stretch
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_HEAD_SHAPE] = 155;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_EGG_HEAD] = 127;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_POINTY_EARS] = 255;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_HEAD_LENGTH] = 45;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_FACE_SHEAR] = 127;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_FOREHEAD_ANGLE] = 104;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_BIG_BROW] = 94;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_PUFFY_UPPER_CHEEKS] = 0; //  upper cheeks 
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_DOUBLE_CHIN] = 122; //  lower cheeks
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_HIGH_CHEEK_BONES] = 130;



            // eyes
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_EYE_SIZE] = 105;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_WIDE_EYES] = 135;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_EYE_SPACING] = 184;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_EYELID_CORNER_UP] = 230;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_EYELID_INNER_CORNER_UP] = 120;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_EYE_DEPTH] = 158;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_UPPER_EYELID_FOLD] = 69;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_BAGGY_EYES] = 38;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_EYELASHES_LONG] = 127;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_POP_EYE] = 127;

            VisualParams[(int)AvatarAppearance.VPElement.EYES_EYE_COLOR] = 25;
            VisualParams[(int)AvatarAppearance.VPElement.EYES_EYE_LIGHTNESS] = 127;

            // ears
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_BIG_EARS] = 255;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_EARS_OUT] = 127;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_ATTACHED_EARLOBES] = 127;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_POINTY_EARS] = 255;

            // nose
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_NOSE_BIG_OUT] = 79;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_WIDE_NOSE] = 35;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_BROAD_NOSTRILS] = 86;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_LOW_SEPTUM_NOSE] = 112; // nostril division
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_BULBOUS_NOSE] = 25;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_NOBLE_NOSE_BRIDGE] = 25; // upper bridge
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_LOWER_BRIDGE_NOSE] = 25; // lower bridge
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_WIDE_NOSE_BRIDGE] = 25;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_UPTURNED_NOSE_TIP] = 107;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_BULBOUS_NOSE_TIP] = 25;
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_CROOKED_NOSE] = 127;


            // Mouth
            VisualParams[(int)AvatarAppearance.VPElement.SHAPE_LIP_WIDTH] = 122;
//.........这里部分代码省略.........
开发者ID:Ideia-Boa,项目名称:diva-distribution,代码行数:101,代码来源:AgentCircuitDataTest.cs

示例2: Login


//.........这里部分代码省略.........
                        if (newHomeRegion == null)
                            guinfo.HomeRegionID = guinfo.LastRegionID = DefaultRegion.RegionID;
                        else
                            guinfo.HomeRegionID = guinfo.LastRegionID = newHomeRegion.RegionID;
                    }
                    else if (guinfo.HomeRegionID == UUID.Zero)
                        guinfo.HomeRegionID = guinfo.LastRegionID = DefaultRegion.RegionID;

                    guinfo.LastPosition = guinfo.HomePosition = new Vector3(128, 128, 128);

                    guinfo.HomeLookAt = guinfo.LastLookAt = new Vector3(0, 0, 0);

                    m_GridUserService.SetLastPosition(guinfo.UserID, UUID.Zero, guinfo.LastRegionID, guinfo.LastPosition, guinfo.LastLookAt);
                    m_GridUserService.SetHome(guinfo.UserID, guinfo.HomeRegionID, guinfo.HomePosition, guinfo.HomeLookAt);
                }

                //
                // Get the avatar
                //
                AvatarData avatar = null;
                if (m_AvatarService != null)
                {
                    avatar = m_AvatarService.GetAvatar(account.PrincipalID);
                    if (avatar == null)
                    {
                        m_log.Error("[LLLOGINSERVICE]: CANNOT FIND AVATAR APPEARANCE " + account.FirstName + " " + account.LastName + ", SETTING TO DEFAULT");
                        if (m_DefaultUserAvatarArchive != "")
                        {
                            archiver.LoadAvatarArchive(m_DefaultUserAvatarArchive, firstName, lastName);
                        }
                        else
                        {
                            AvatarAppearance appearance = new AvatarAppearance();
                            appearance.SetDefaultWearables();
                            m_AvatarService.SetAvatar(account.PrincipalID, new AvatarData(appearance));
                        }
                        avatar = m_AvatarService.GetAvatar(account.PrincipalID);
                    }
                }

                //
                // Instantiate/get the simulation interface and launch an agent at the destination
                //
                string reason = string.Empty;
                GridRegion dest;
                AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where,
                    clientVersion, channel, mac, id0, clientIP, out where, out reason, out dest);
                destination = dest;
                if (requestData.ContainsKey("id0"))
                    id0 = (string)requestData["id0"];
                string platform = "";
                if (requestData.ContainsKey("platform"))
                    platform = (string)requestData["platform"];

                if (aCircuit == null)
                {
                    m_PresenceService.LogoutAgent(session);
                    m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: {0}", reason);
                    return new LLFailedLoginResponse(LoginResponseEnum.PasswordIncorrect, reason, "false");
                }

                // Get Friends list 
                FriendInfo[] friendsList = new FriendInfo[0];
                if (m_FriendsService != null)
                {
                    friendsList = m_FriendsService.GetFriends(account.PrincipalID);
开发者ID:NickyPerian,项目名称:Aurora,代码行数:67,代码来源:LLLoginService.cs


注:本文中的AvatarAppearance.SetDefaultWearables方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。