Пример #1
0
        private static void SetDefaultUserProperties(ref UserProperties userProperties)
        {
            if (!userProperties.TryGetProperty(UserAccountProperties.FirstTimeUser))
            {
                userProperties.SetProperty(UserAccountProperties.FirstTimeUser, true);
            }

            if (!userProperties.TryGetProperty(UserAccountProperties.HasCompletedShoppingTutorial))
            {
                userProperties.SetProperty(UserAccountProperties.HasCompletedShoppingTutorial, false);
            }

            if (!userProperties.TryGetProperty(UserAccountProperties.HasPlayedFashionMiniGame))
            {
                userProperties.SetProperty(UserAccountProperties.HasPlayedFashionMiniGame, false);
            }

            if (!userProperties.TryGetProperty(UserAccountProperties.HasCompletedOpenMapTutorial))
            {
                userProperties.SetProperty(UserAccountProperties.HasCompletedOpenMapTutorial, false);
            }

            if (!userProperties.TryGetProperty(UserAccountProperties.HasCompletedDecorateTutorial))
            {
                userProperties.SetProperty(UserAccountProperties.HasCompletedDecorateTutorial, false);
            }

            if (!userProperties.TryGetProperty(UserAccountProperties.HasCompletedGetCashTutorial))
            {
                userProperties.SetProperty(UserAccountProperties.HasCompletedGetCashTutorial, false);
            }

            if (!userProperties.TryGetProperty(UserAccountProperties.HasCompleteMoveTutorial))
            {
                userProperties.SetProperty(UserAccountProperties.HasCompleteMoveTutorial, false);
            }



            if (!userProperties.TryGetProperty(UserAccountProperties.LastRoomId))
            {
                userProperties.SetProperty(UserAccountProperties.LastRoomId, GetRandomDefaultPublicRoomId());
            }
        }
Пример #2
0
        public bool TryGetAccountProperty <T>(UserAccountProperties userAccountProperty, ref T returnObject)
        {
            object findObjectInDictionary = null;

            if (mUserProperties.TryGetProperty(userAccountProperty, out findObjectInDictionary))
            {
                try
                {
                    returnObject = (T)findObjectInDictionary;
                    return(true);
                }
                catch (System.Exception ex)
                {
                    throw ex;
                }
            }
            return(false);
        }