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

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

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

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

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

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

	playerObj.Lv = lv
}