public void AddBagCapcity() { int nowBoughtTimes = UserProps.GetProperty_Int32(UserProperty.bagCapcity_expandedSize); UserProps.SetProperty_Int32(UserProperty.bagCapcity_expandedSize, nowBoughtTimes + 1); NotifyChanged((int)ENPropertyChanged.enUserPropertyChanged, null); }
public int GetBagCapcity() { BagInfo info = GameTable.BagTableAsset.LookUp((int)BAGTYPEENUM.enCardBagType); int capcity = 50; if (info != null) { capcity = info.m_initalSize; } return(capcity + UserProps.GetProperty_Int32(UserProperty.bagCapcity_expandedSize)); }
public void AddDiamond(int diamond) { int bind_money = UserProps.GetProperty_Int32(UserProperty.bind_money); bind_money = bind_money + diamond; if (bind_money <= 0) { bind_money = 0; } UserProps.SetProperty_Int32(UserProperty.bind_money, bind_money); Debug.Log("添加或减少的钻石为:" + diamond + ",调整后的身上钻石为:" + bind_money); }
// 设置金币 public void AddMoney(int money) { int num = UserProps.GetProperty_Int32(UserProperty.money); num = num + money; if (num <= 0) { num = 0; } UserProps.SetProperty_Int32(UserProperty.money, num); Debug.Log("设置金币:" + money + ",调整后的身上金币为:" + num); NotifyChanged((int)ENPropertyChanged.enUserPropertyChanged, null); }
//好友的数量 public int GetFriendCount() { int initSize = GameTable.WorldParamTableAsset.Lookup((int)ENWorldParamIndex.enInitFriendCount).IntTypeValue; return(initSize + UserProps.GetProperty_Int32(UserProperty.friendCount_expandedSize)); }
public int GetNowSelectTeam() { return(UserProps.GetProperty_Int32(UserProperty.nowSelect_team)); }
// 获得当前等级 public int GetLevel() { return(UserProps.GetProperty_Int32(UserProperty.level)); }
//获取军资 public int GetEnergy() { return(UserProps.GetProperty_Int32(UserProperty.energy)); }
// 获得当前体力 public int GetStamina() { return(UserProps.GetProperty_Int32(UserProperty.stamina)); }
// 获得当前经验 public int GetExp() { return(UserProps.GetProperty_Int32(UserProperty.exp)); }
//获取友情点的数量 public int GetFriendShipPoint() { return(UserProps.GetProperty_Int32(UserProperty.friendship_point)); }
// 获得金币 public int GetMoney() { return(UserProps.GetProperty_Int32(UserProperty.money)); }
// 获得钻石 public int GetDiamond() { return(UserProps.GetProperty_Int32(UserProperty.bind_money)); }