Ejemplo n.º 1
0
func UpdateInfo_Name(playerObj *player.Player, name string) {
	playerObj.MutexObj.Lock()
	defer playerObj.MutexObj.Unlock()

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

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

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

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

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

	playerObj.Lv = lv
}