コード例 #1
0
    public void PopulateContentByType(OutfitType outfitType)
    {
        ClearContent();
        var presets = outfitController.FindPresetsOfType(outfitType);

        foreach (var preset in presets)
        {
            AddOutfitView(preset);
        }
    }
コード例 #2
0
        public DefinedOutfit(Outfit outfit, OutfitType outfitType)
        {
#if DRESSER_OUTFIT
            Log.Warning("Begin DefinedOutfit(Outfit: " + outfit.label + ", OutfitType: " + outfitType + ")");
#endif
            this.Outfit     = outfit;
            this.outfitType = outfitType;
#if DRESSER_OUTFIT
            Log.Warning("End DefinedOutfit");
#endif
        }
コード例 #3
0
    private void ChangeOutfit(OutfitType outfitType, bool isNext)
    {
        switch (outfitType)
        {
        case OutfitType.Hair:
            if (isNext)
            {
                currHairIndex = currHairIndex < 5 ? ++currHairIndex : 1;
            }
            else
            {
                currHairIndex = currHairIndex > 1 ? --currHairIndex : 5;
            }
            equipmentMgr.ChangeOutfit(outfitType, currHairIndex);
            break;

        case OutfitType.Cloth:
            if (isNext)
            {
                currClothIndex = currClothIndex < 5 ? ++currClothIndex : 1;
            }
            else
            {
                currClothIndex = currClothIndex > 1 ? --currClothIndex : 5;
            }
            equipmentMgr.ChangeOutfit(outfitType, currClothIndex);
            break;

        case OutfitType.Pant:
            if (isNext)
            {
                currPantIndex = currPantIndex < 5 ? ++currPantIndex : 1;
            }
            else
            {
                currPantIndex = currPantIndex > 1 ? --currPantIndex : 5;
            }
            equipmentMgr.ChangeOutfit(outfitType, currPantIndex);
            break;

        case OutfitType.Shoes:
            if (isNext)
            {
                currShoesIndex = currShoesIndex < 5 ? ++currShoesIndex : 1;
            }
            else
            {
                currShoesIndex = currShoesIndex > 1 ? --currShoesIndex : 5;
            }
            equipmentMgr.ChangeOutfit(outfitType, currShoesIndex);
            break;
        }
    }
コード例 #4
0
    public List <OutfitPreset> FindPresetsOfType(OutfitType outfitType)
    {
        var outfitSlotsMatch   = outfitSlots.FindAll(os => os.outfitType == outfitType);
        var foundOutfitPresets = new List <OutfitPreset>();

        foreach (var slot in outfitSlotsMatch)
        {
            var slotMatchedPresets = outfitPresets.FindAll(op => op.meshName == slot.name);
            foundOutfitPresets.AddRange(slotMatchedPresets);
        }
        return(foundOutfitPresets);
    }
コード例 #5
0
        public void SetOutfitModel(OutfitType outfit)
        {
            if (Gender == Gender.FEMALE && outfit < OutfitType.tank1skirt)
            {
                outfit = OutfitType.tank1skirt;
            }
            else if (Gender == Gender.MALE && outfit > OutfitType.poloshort)
            {
                outfit = OutfitType.tshirtshort;
            }

            Outfit = outfit;
            UpdatePlayerModel();
        }
コード例 #6
0
        private bool ChangeToOutfitType(OutfitType type)
        {
#if DRESSER_OUTFIT
            Log.Warning("Start PawnOutfitTracker.ChangeToOutfitType(OutfitType: " + type + ")");
            Log.Message("    Search CustomOutfits Count " + CustomOutfits.Count);
#endif
            foreach (IDresserOutfit outfit in this.CustomOutfits)
            {
#if DRESSER_OUTFIT
                Log.Message("        " + outfit.Label);
#endif
                if (outfit.OutfitType == type)
                {
#if DRESSER_OUTFIT
                    Log.Message("            -> ChangeTo");
#endif
                    this.ChangeTo(outfit);
#if DRESSER_OUTFIT
                    Log.Warning("End PawnOutfitTracker.ChangeToOutfitType -> True");
#endif
                    return(true);
                }
            }
#if DRESSER_OUTFIT
            Log.Message("    Search DefinedOutfits Count " + DefinedOutfits.Count);
#endif
            foreach (IDresserOutfit outfit in this.DefinedOutfits)
            {
#if DRESSER_OUTFIT
                Log.Message("        " + outfit.Label);
#endif
                if (outfit.OutfitType == type)
                {
#if DRESSER_OUTFIT
                    Log.Message("            -> ChangeTo");
#endif
                    this.ChangeTo(outfit);
#if DRESSER_OUTFIT
                    Log.Warning("End PawnOutfitTracker.ChangeToOutfitType -> True");
#endif
                    return(true);
                }
            }
#if DRESSER_OUTFIT
            Log.Warning("End PawnOutfitTracker.ChangeToOutfitType -> False");
#endif
            return(false);
        }
コード例 #7
0
        public void UpdateOutfitType(Outfit outfit, OutfitType outfitType)
        {
#if DRESSER_OUTFIT
            Log.Warning("Begin PawnOutfitTracker.UpdateOutfitType(Outfit: " + outfit.label + " OutfitType: " + outfitType + ")");
#endif
            foreach (DefinedOutfit o in this.DefinedOutfits)
            {
#if DRESSER_OUTFIT
                Log.Warning("    Outfit: " + o.Label);
#endif
                if (o.Outfit == outfit)
                {
#if DRESSER_OUTFIT
                    Log.Warning("        Found - Updating OutfitType");
#endif
                    o.OutfitType = outfitType;
                    break;
                }
            }
#if DRESSER_OUTFIT
            Log.Warning("End PawnOutfitTracker.UpdateOutfitType");
#endif
        }
コード例 #8
0
        public void InitializeMatchPlayer(
            ReboundCG.Tennis.Simulation.IMatchPlayer matchPlayer,
            bool reverseDisplay,
            Color playerColor,
            ITennisPlayerLook playerLook,
            IEquipmentItem tech,
            IEquipmentItem outfit,
            IEquipmentItem shoes,
            SignalBus signalBus,
            MatchSimulationManager matchSimulationManager
            )
        {
            m_signalBus = signalBus;
            m_matchSimulationManager = matchSimulationManager;

            if (m_matchData == null)
            {
                m_matchData = new MatchInitializationData();
            }

            m_matchData.MatchPlayer    = matchPlayer;
            m_matchData.ReverseDisplay = reverseDisplay;
            m_matchData.Color          = playerColor;

            m_matchData.PlayerLookData = playerLook;
            m_matchData.TechData       = tech;
            m_matchData.OutfitData     = outfit;
            m_matchData.ShoesData      = shoes;

            if (m_matchData.PlayerLookData != null)
            {
                Gender = m_matchData.PlayerLookData.Gender;
                SetSkinType(m_matchData.PlayerLookData.Skin);
                SetHairdo(m_matchData.PlayerLookData.HairModel);

                if (ColorUtility.TryParseHtmlString(playerLook.HairColor, out Color hairColor))
                {
                    HairColor = hairColor;
                }

                Wristbands = m_matchData.PlayerLookData.Wristbands;
            }

            if (m_matchData.OutfitData != null)
            {
                Outfit = GetOutfitType(m_matchData.OutfitData.Model);

                ColorUtility.TryParseHtmlString(m_matchData.OutfitData.Color2, out Color color2);
                AccessoryColor = color2;

                OutfitBrandId = m_matchData.OutfitData.EquipmentBrandId;
                OutfitId      = m_matchData.OutfitData.Id;
            }

            if (m_matchData.ShoesData != null)
            {
                ShoesBrandId = m_matchData.ShoesData.EquipmentBrandId;
                ShoesId      = m_matchData.ShoesData.Id;
            }

            if (m_matchData.TechData != null)
            {
                RacketBrandId = m_matchData.TechData.EquipmentBrandId;
                RacketId      = m_matchData.TechData.Id;
            }
        }
コード例 #9
0
 public Clothing(IDressHolder dressHolder, OutfitType type)
 {
     _type        = type;
     _dressHolder = dressHolder;
 }
コード例 #10
0
ファイル: Outfitter.cs プロジェクト: GJiin/meridian59-dotnet
        /// <summary>
        /// Call this to get messages which will switch outfit accordingly
        /// </summary>
        /// <param name="TargetOutfit"></param>
        /// <param name="DoEquippedCheck"></param>
        /// <returns>A list of GameMessages to send to switch the outfit</returns>
        public List<GameMessage> SwitchOutfit(OutfitType TargetOutfit, bool DoEquippedCheck)
        {
            List<GameMessage> PacketList = new List<GameMessage>();

            switch (TargetOutfit)
            {
                case OutfitType.WC:
                    // armor (plate > scale)
                    if ((Plate != null) && (!Plate.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(Plate.ID));
                    else if ((Scale != null) && (!Scale.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(Scale.ID));

                    // helm (msh > helm)
                    if ((MSH != null) && (!MSH.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(MSH.ID));
                    else if ((Helm != null) && (!Helm.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(Helm.ID));

                    // pants + jerkin + gauntlets
                    if ((Jerkin != null) && (!Jerkin.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(Jerkin.ID));

                    if ((Pants != null) && (!Pants.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(Pants.ID));

                    if ((Gauntlets != null) && (!Gauntlets.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(Gauntlets.ID));
                    break;

                case OutfitType.Sha:
                    // robe
                    if ((ShaRobe != null) && (!ShaRobe.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(ShaRobe.ID));

                    if ((Ivy != null) && (!Ivy.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(Ivy.ID));

                    // jerkin
                    if ((Jerkin != null) && (!Jerkin.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(Jerkin.ID));

                    break;

                case OutfitType.Qor:
                    // robe
                    if ((QorRobe != null) && (!QorRobe.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(QorRobe.ID));

                    // jerkin
                    if ((Jerkin != null) && (!Jerkin.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(Jerkin.ID));

                    break;

                case OutfitType.Kra:
                    // robe
                    if ((KraRobe != null) && (!KraRobe.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(KraRobe.ID));

                    // jerkin
                    if ((Jerkin != null) && (!Jerkin.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(Jerkin.ID));

                    break;

                case OutfitType.Far:
                    // robe
                    if ((FarRobe != null) && (!FarRobe.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(FarRobe.ID));

                    // froz
                    if ((FrozJewel != null) && (!FrozJewel.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(FrozJewel.ID));

                    // jerkin
                    if ((Jerkin != null) && (!Jerkin.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(Jerkin.ID));

                    break;

                case OutfitType.Rij:
                    // robe
                    if ((RijRobe != null) && (!RijRobe.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(RijRobe.ID));

                    // jerkin
                    if ((Jerkin != null) && (!Jerkin.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(Jerkin.ID));

                    // sword
                    if ((RiijaSword != null) && (!RiijaSword.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(RiijaSword.ID));

                    break;

                case OutfitType.Jal:
                    // robe
                    if ((JalRobe != null) && (!JalRobe.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(JalRobe.ID));

                    // jerkin
                    if ((Jerkin != null) && (!Jerkin.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(Jerkin.ID));

                    // jalanecklace
                    if ((JalaNecklace != null) && (!JalaNecklace.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(JalaNecklace.ID));

                    // truelute
                    if ((TrueLute != null) && (!TrueLute.IsInUse || !DoEquippedCheck))
                        PacketList.Add(new ReqUseMessage(TrueLute.ID));

                    break;
            }

            CurrentOutfit = TargetOutfit;
            return PacketList;
        }
コード例 #11
0
 /// <summary>
 /// True if the outfit type is classified as a 'custom' outfit.
 /// (A short term, special use outfit.)
 /// </summary>
 /// <param name="typ">The outfity type to check.</param>
 /// <returns>
 /// True if the outfit type is classified as a 'custom' outfit.
 /// </returns>
 public static bool IsCustom(this OutfitType typ)
 {
     return(typ != OutfitType.None && !IsStandard(typ));
 }
コード例 #12
0
 /// <summary>
 /// True if the outfit type is classified as a 'standard' outfit.
 /// (A long term, general use outfit.)
 /// </summary>
 /// <param name="typ">The outfity type to check.</param>
 /// <returns>
 /// True if the outfit type is classified as a 'standard' outfit.
 /// </returns>
 public static bool IsStandard(this OutfitType typ)
 {
     return((int)typ < (int)OutfitType.Custom);
 }
コード例 #13
0
        /// <summary>
        /// Call this to get messages which will switch outfit accordingly
        /// </summary>
        /// <param name="TargetOutfit"></param>
        /// <param name="DoEquippedCheck"></param>
        /// <returns>A list of GameMessages to send to switch the outfit</returns>
        public List <GameMessage> SwitchOutfit(OutfitType TargetOutfit, bool DoEquippedCheck)
        {
            List <GameMessage> PacketList = new List <GameMessage>();

            switch (TargetOutfit)
            {
            case OutfitType.WC:
                // armor (plate > scale)
                if ((Plate != null) && (!Plate.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(Plate.ID));
                }
                else if ((Scale != null) && (!Scale.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(Scale.ID));
                }

                // helm (msh > helm)
                if ((MSH != null) && (!MSH.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(MSH.ID));
                }
                else if ((Helm != null) && (!Helm.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(Helm.ID));
                }

                // pants + jerkin + gauntlets
                if ((Jerkin != null) && (!Jerkin.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(Jerkin.ID));
                }

                if ((Pants != null) && (!Pants.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(Pants.ID));
                }

                if ((Gauntlets != null) && (!Gauntlets.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(Gauntlets.ID));
                }
                break;

            case OutfitType.Sha:
                // robe
                if ((ShaRobe != null) && (!ShaRobe.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(ShaRobe.ID));
                }

                if ((Ivy != null) && (!Ivy.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(Ivy.ID));
                }

                // jerkin
                if ((Jerkin != null) && (!Jerkin.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(Jerkin.ID));
                }

                break;

            case OutfitType.Qor:
                // robe
                if ((QorRobe != null) && (!QorRobe.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(QorRobe.ID));
                }

                // jerkin
                if ((Jerkin != null) && (!Jerkin.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(Jerkin.ID));
                }

                break;

            case OutfitType.Kra:
                // robe
                if ((KraRobe != null) && (!KraRobe.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(KraRobe.ID));
                }

                // jerkin
                if ((Jerkin != null) && (!Jerkin.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(Jerkin.ID));
                }

                break;

            case OutfitType.Far:
                // robe
                if ((FarRobe != null) && (!FarRobe.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(FarRobe.ID));
                }

                // froz
                if ((FrozJewel != null) && (!FrozJewel.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(FrozJewel.ID));
                }

                // jerkin
                if ((Jerkin != null) && (!Jerkin.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(Jerkin.ID));
                }

                break;

            case OutfitType.Rij:
                // robe
                if ((RijRobe != null) && (!RijRobe.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(RijRobe.ID));
                }

                // jerkin
                if ((Jerkin != null) && (!Jerkin.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(Jerkin.ID));
                }

                // sword
                if ((RiijaSword != null) && (!RiijaSword.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(RiijaSword.ID));
                }

                break;

            case OutfitType.Jal:
                // robe
                if ((JalRobe != null) && (!JalRobe.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(JalRobe.ID));
                }

                // jerkin
                if ((Jerkin != null) && (!Jerkin.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(Jerkin.ID));
                }

                // jalanecklace
                if ((JalaNecklace != null) && (!JalaNecklace.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(JalaNecklace.ID));
                }

                // truelute
                if ((TrueLute != null) && (!TrueLute.IsInUse || !DoEquippedCheck))
                {
                    PacketList.Add(new ReqUseMessage(TrueLute.ID));
                }

                break;
            }

            CurrentOutfit = TargetOutfit;
            return(PacketList);
        }
コード例 #14
0
 public void RemoveOutfit(OutfitType outfitType)
 {
     _outfit.Remove(outfitType);
 }
コード例 #15
0
 public void AddOutfit(OutfitType outfitType)
 {
     _outfit.Add(outfitType);
 }
コード例 #16
0
 public bool HasOutfit(OutfitType outfitType)
 {
     return(_outfit.Contains(outfitType));
 }