示例#1
0
func UpdateInfo_Name(playerObj *player.Player, name string) {
	playerObj.MutexObj.Lock()
	defer playerObj.MutexObj.Unlock()

	playerObj.Name = name
}
示例#2
0
func UpdateInfo_Gold(playerObj *player.Player, gold int) {
	playerObj.MutexObj.Lock()
	defer playerObj.MutexObj.Unlock()

	playerObj.Gold = gold
}
示例#3
0
func UpdateInfo_Diamond(playerObj *player.Player, diamond int) {
	playerObj.MutexObj.Lock()
	defer playerObj.MutexObj.Unlock()

	playerObj.Diamond = diamond
}
示例#4
0
func UpdateInfo_VipExp(playerObj *player.Player, vipExp int) {
	playerObj.MutexObj.Lock()
	defer playerObj.MutexObj.Unlock()

	playerObj.VipExp = vipExp
}
示例#5
0
func UpdateInfo_Exp(playerObj *player.Player, exp int) {
	playerObj.MutexObj.Lock()
	defer playerObj.MutexObj.Unlock()

	playerObj.Exp = exp
}
示例#6
0
func UpdateInfo_Lv(playerObj *player.Player, lv int) {
	playerObj.MutexObj.Lock()
	defer playerObj.MutexObj.Unlock()

	playerObj.Lv = lv
}