Beispiel #1
0
        private void CreateAvatarComponentDisplayItems(string setName, string componentName, Profile.LockState lockState, float yPosition)
        {
            string name        = string.Concat(componentName, " ", setName);
            string messageText = Translator.Translation(string.Concat("item-", lockState).ToLower()).Replace("[ITEM]", Translator.Translation(name));

            if (lockState == Profile.LockState.FullVersionOnly)
            {
                messageText = Translator.Translation("buy full game to unlock");
            }

            _registerObject(
                new TextContent(messageText, new Vector2(Unlock_Text_X, yPosition + Unlock_Text_Y_Offset))
            {
                FadeFraction         = 0.0f,
                FadeFractionModifier = LockStateFadeModifier(lockState),
                Alignment            = TextWriter.Alignment.Left,
                Scale = Unlock_Text_Scale
            });

            AvatarComponent component = AvatarComponentManager.Component(setName, componentName);
            AvatarContent   avatar    = new AvatarContent(new Vector2(Unlock_Image_X, yPosition), AvatarComponentManager.DisplaySkeletonForSet(setName));

            if (setName != "body")
            {
                avatar.AddComponent(AvatarComponentManager.Component("body", "Blue"));
            }
            avatar.AddComponent(AvatarComponentManager.Component(setName, componentName));
            avatar.SkinSkeleton();
            avatar.FadeFraction         = 0.0f;
            avatar.FadeFractionModifier = LockStateFadeModifier(lockState);
            avatar.Scale = 0.65f;
            _registerObject(avatar);
        }
        private void CreateAvatarCostumeDisplayItems(string costumeName, Profile.LockState lockState, float yPosition)
        {
            string name = string.Concat(costumeName, " costume");
            string messageText = Translator.Translation(string.Concat("item-", lockState).ToLower()).Replace("[ITEM]", Translator.Translation(name));
            if (lockState == Profile.LockState.FullVersionOnly) { messageText = Translator.Translation("buy full game to unlock"); }

            _registerObject(
                new TextContent(messageText, new Vector2(Unlock_Text_X, yPosition + Unlock_Text_Y_Offset))
                {
                    FadeFraction = 0.0f,
                    FadeFractionModifier = LockStateFadeModifier(lockState),
                    Alignment = TextWriter.Alignment.Left,
                    Scale = Unlock_Text_Scale
                });

            AvatarContent avatar = new AvatarContent(new Vector2(Unlock_Image_X, yPosition), Avatar_Costume_Display_Skeleton);
            avatar.AddComponent(AvatarComponentManager.Component("body", "Blue"));

            foreach (XElement el in AvatarComponentManager.CostumeComponents[costumeName].Elements("component"))
            {
                avatar.AddComponent(AvatarComponentManager.Component(el.Attribute("set").Value, el.Attribute("name").Value));
            }
            avatar.SkinSkeleton();
            avatar.FadeFraction = 0.0f;
            avatar.FadeFractionModifier = LockStateFadeModifier(lockState);
            avatar.Scale = 0.65f;
            _registerObject(avatar);
        }
        private void CreateAvatarComponentDisplayItems(string setName, string componentName, Profile.LockState lockState, float yPosition)
        {
            string name = string.Concat(componentName, " ", setName);
            string messageText = Translator.Translation(string.Concat("item-", lockState).ToLower()).Replace("[ITEM]", Translator.Translation(name));
            if (lockState == Profile.LockState.FullVersionOnly) { messageText = Translator.Translation("buy full game to unlock"); }

            _registerObject(
                new TextContent(messageText, new Vector2(Unlock_Text_X, yPosition + Unlock_Text_Y_Offset))
                {
                    FadeFraction = 0.0f,
                    FadeFractionModifier = LockStateFadeModifier(lockState),
                    Alignment = TextWriter.Alignment.Left,
                    Scale = Unlock_Text_Scale
                });

            AvatarComponent component = AvatarComponentManager.Component(setName, componentName);
            AvatarContent avatar = new AvatarContent(new Vector2(Unlock_Image_X, yPosition), AvatarComponentManager.DisplaySkeletonForSet(setName));

            if (setName != "body") { avatar.AddComponent(AvatarComponentManager.Component("body", "Blue")); }
            avatar.AddComponent(AvatarComponentManager.Component(setName, componentName));
            avatar.SkinSkeleton();
            avatar.FadeFraction = 0.0f;
            avatar.FadeFractionModifier = LockStateFadeModifier(lockState);
            avatar.Scale = 0.65f;
            _registerObject(avatar);
        }