Exemplo n.º 1
0
 public void SetGameCompleted()
 {
     ProfileCompletion = ProfileCompletionState.GameCompleted;
     AppManager.I.RewardSystemManager.UnlockAllMissingExtraPacks();
     CheckGameFinished();
     Save();
 }
Exemplo n.º 2
0
        /// <summary>
        /// Charge this with PlayerProfileData.
        /// </summary>
        public PlayerProfile FromData(PlayerProfileData _data)
        {
            Uuid = _data.Uuid;

            AvatarId                       = _data.AvatarId;
            Age                            = _data.Age;
            Gender                         = _data.Gender;
            Tint                           = _data.Tint;
            IsDemoUser                     = _data.IsDemoUser;
            HasFinishedTheGame             = _data.JourneyCompleted;
            HasFinishedTheGameWithAllStars = _data.HasFinishedTheGameWithAllStars();
            ProfileCompletion              = _data.ProfileCompletion;
            TotalNumberOfBones             = _data.TotalBones;

            HasMaxStarsInCurrentPlaySessions = _data.GetAdditionalData().HasMaxStarsInCurrentPlaySessions;
            ConsecutivePlayDays = _data.GetAdditionalData().ConsecutivePlayDays;
            CurrentShopState    = AnturaSpace.ShopState.CreateFromJson(_data.GetAdditionalData().CurrentShopStateJSON);
            FirstContactState   = JsonUtility.FromJson <FirstContactState>(_data.FirstContactStateJSON);

            SetCurrentJourneyPosition(_data.GetCurrentJourneyPosition(), false);
            SetMaxJourneyPosition(_data.GetMaxJourneyPosition(), false);
            // Antura customization save only customization data
            jsonAnturaCustomizationData = _data.CurrentAnturaCustomization;

            return(this);
        }
Exemplo n.º 3
0
 public void SetFinalShown(bool isInitialising = false)
 {
     if (!isInitialising)
     {
         AppManager.I.RewardSystemManager.UnlockAllMissingExtraPacks();
     }
     ProfileCompletion = ProfileCompletionState.GameCompletedAndFinalShown;
 }
Exemplo n.º 4
0
        public PlayerProfileData(
            string _Uuid,
            int _AvatarId,
            PlayerGender _Gender,
            PlayerTint _Tint,
            Color _SkinColor,
            Color _HairColor,
            Color _BgColor,
            int _Age,
            bool _IsDemoUser,
            bool _HasFinishedTheGame,
            bool _HasFinishedTheGameWithAllStars,
            bool _HasMaxStarsInCurrentPlaySessions,
            int totalBones,
            ProfileCompletionState profileCompletion,
            string currentAnturaCustomization,
            int comboPlayDays,
            AnturaSpace.ShopState currentShopState,
            FirstContactState currentFirstContactState,
            AppEditions edition,
            string appVersion
            )
        {
            Id               = UNIQUE_ID; // Only one record
            AppVersion       = appVersion;
            Edition          = edition;
            Uuid             = _Uuid;
            AvatarId         = _AvatarId;
            Gender           = _Gender;
            Tint             = _Tint;
            SkinColor        = _SkinColor.ToHex();
            HairColor        = _HairColor.ToHex();
            BgColor          = _BgColor.ToHex();
            IsDemoUser       = _IsDemoUser;
            JourneyCompleted = _HasFinishedTheGame;
            TotalScore       = (_HasFinishedTheGameWithAllStars ? 1f : 0f);

            Age = _Age;
            ProfileCompletion = profileCompletion;
            TotalBones        = totalBones;
            SetMaxJourneyPosition(JourneyPosition.InitialJourneyPosition);
            SetCurrentJourneyPosition(JourneyPosition.InitialJourneyPosition);
            Timestamp = GenericHelper.GetTimestampForNow();
            CurrentAnturaCustomization = currentAnturaCustomization;
            AdditionalData             = JsonUtility.ToJson(new PlayerProfileAdditionalData(_HasMaxStarsInCurrentPlaySessions, comboPlayDays, currentShopState.ToJson()));
            FirstContactStateJSON      = JsonUtility.ToJson(currentFirstContactState);
        }
Exemplo n.º 5
0
 public void SetFinalShown()
 {
     ProfileCompletion = ProfileCompletionState.GameCompletedAndFinalShown;
 }
Exemplo n.º 6
0
 /// <summary>
 /// Resets the player profile completion.
 /// </summary>
 public void ResetPlayerProfileCompletion()
 {
     ProfileCompletion = ProfileCompletionState.New;
     Save();
 }
Exemplo n.º 7
0
 public void SetGameCompleted()
 {
     ProfileCompletion = ProfileCompletionState.GameCompleted;
     CheckGameFinished();
     Save();
 }