コード例 #1
0
        public void SetLeftWristband(bool visible)
        {
            switch (Wristbands)
            {
            case Wristbands.None:
            case Wristbands.Left:
                Wristbands = visible ? Wristbands.Left : Wristbands.None;
                break;

            case Wristbands.Right:
            case Wristbands.Both:
                Wristbands = visible ? Wristbands.Both : Wristbands.Right;
                break;
            }

            m_playerLook?.SetWristbands((int)Wristbands, AccessoryColor);
        }
コード例 #2
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;
            }
        }