我曾经玩过的一个手游就是记录某个时刻和当时的体力值,下面是客户端反编译的代码相关的部分: ``` public new int St { get { if (base.St >= SingletonInstance<UserService>.SharedInstance.MaxSt) { return base.St; } double num = (SingletonInstance<TimeService>.SharedInstance.ServerDateTime - base.StUpdatedAt).TotalSeconds / ServerConsts.HealStInterval.TotalSeconds; return Mathf.Min(SingletonInstance<UserService>.SharedInstance.MaxSt, base.St + (int)num); } } ```