void OnGetUserStateRegular(NetMsgDef msg) { TSCGetUserStateRegular userState = TSCGetUserStateRegular.ParseFrom(msg.mBtsData); userPackage.SetPlayerState(userState); SendEvent("RefreshUserState"); }
public void SetPlayerState(TSCGetUserStateRegular state) { blood = state.Blood; hunger = state.Food; thirst = state.Water; health = state.Health; mood = state.Mood; attack = state.Attack; defense = state.Defense; agile = state.Agile; speed = state.Speed; intellect = state.Intellect; }
public void SetPlayerState(TSCGetUserStateRegular userState) { playerState.SetPlayerState(userState); SetPersonContribution(userState.Contribution); }