Beispiel #1
0
        public CurrentSkinData(CurrentSkinData skinData)
        {
            this.SkinId = skinData.SkinId;

            this.HeadIndex  = skinData.HeadIndex;
            this.BodyIndex  = skinData.BodyIndex;
            this.PantsIndex = skinData.PantsIndex;

            this.HeadColor     = skinData.HeadColor;
            this.Costume1Color = skinData.Costume1Color;
            this.Costume2Color = skinData.Costume2Color;
        }
Beispiel #2
0
        public void Load(Action <bool> onComplete)
        {
            if (PlayerPrefs.HasKey(USER_PROFILE))
            {
                string localUserProfile = PlayerPrefs.GetString(USER_PROFILE);
                myCurrentSkin = new CurrentSkinData(localUserProfile);
            }
            else
            {
                //myCurrentSkin = new CurrentSkinData();
                ColorUtility.TryParseHtmlString("#53800b", out myCurrentSkin.HeadColor);
                ColorUtility.TryParseHtmlString("#916ae5", out myCurrentSkin.Costume1Color);
                ColorUtility.TryParseHtmlString("#ce9260", out myCurrentSkin.Costume2Color);
            }

            onComplete?.Invoke(true);
        }
Beispiel #3
0
 public void SetSkin(CurrentSkinData skinData)
 {
     skinData.ToCharacterData(ref _currentCharacter);
     Save();
 }
Beispiel #4
0
        public void SetSkin(CurrentSkinData skinData)
        {
            this.myCurrentSkin = skinData;

            Save();
        }