Пример #1
0
 /// <summary>
 /// 게스트유저에서 페이스북 유저로 전환되었다.. 기존 데이터 정리
 /// </summary>
 public void ResetReConnect()
 {
     SaleType                  = eSaleType.normal;
     _PKLogin                  = null;
     _PKUserInfo               = null;
     _PKGamesInfo              = null;
     _PKGiftsCount             = null;
     _PKListGifts              = null;
     _PKAppFriends             = null;
     _PKSendGiftChallengeItems = null;
     _PKInvitChallengeCheck    = null;
     _PKInvitChallengeStatus   = null;
     // coins , deal
     _PKCheckDeal            = null;
     _PKGetPurchaseItems     = null;
     _PKGetUserPromotionList = null;
     // collect bounus
     _PKCollectBonus = null;
     _PKBonusInfo    = null;
     // pig bank
     //_PKPurchaseVault = null;
     //_PKVaultInfo = null;
     //_PKGetVaultShop = null;
     // News
     _PKNews      = null;
     oldUserLevel = 0;
 }
Пример #2
0
    /// <summary>
    /// 나의 정보 세팅
    /// </summary>
    /// <param name="msg">The MSG.</param>
    public void SetPKUserInfo(string msg)
    {
        _PKUserInfo = JsonConvert.DeserializeObject <PK.UserInfo.RECEIVE>(msg);
        _PKUserInfo.ConvertIdToString();
        SaleType     = (eSaleType)_PKUserInfo.data.sale_type;
        oldUserLevel = _PKUserInfo.data.user_level;

        System.DateTime reg_date = System.Convert.ToDateTime(_PKUserInfo.data.reg_date);
        long            tick     = System.DateTime.Now.Ticks - reg_date.Ticks;

        if (tick > 0)
        {
            System.DateTime n_day = new System.DateTime(tick);
            bFirstPayDayin3Day = n_day.Day > 3 ? false : true;
        }
        else
        {
            bFirstPayDayin3Day = false;
        }

        Debug.Log("========= SaleType : " + SaleType + " =====================");
    }