Monday, February 28, 2022

Thread muc luong cong ty o voz

 https://voz.vn/t/thread-tong-hop-chia-se-ve-muc-luong-tai-cac-cong-ty.459731/page-4

Thursday, February 24, 2022

Tin tuyen dung tiem giat ui

 Cửa hàng giặt ủi cao cấp Mr Hoàng New World cần tuyển:

🍒🍒 Nhân viên ca 1 từ 8h-17h. 1 tháng được nghỉ 2 ngày không liền kề, không vào thứ 7, CN; không trùng ngày nghỉ với nv cùng ca.
Lương 6tr thử việc, lễ tết nghỉ nếu làm lương ×2, có thưởng thâm niên.
Sau 1 tháng nếu thấy phù hợp ký hợp đồng 1 năm, lương tăng theo cấp bậc tay nghề (từ 7tr- 10tr).
Yêu cầu: thực hiện các công việc của cửa hàng trừ khi có yêu cầu riêng, trung thực, cẩn thận, thường xuyên nâng cao tay nghề, giao tiếp khách lịch sự thân thiện.
Đóng bhxh nếu người lao động có nhu cầu.
🍒🍒 Nhân viên ca 2 từ 17h-21h, lương 20k/h, lễ tết nghỉ nếu làm 40k/h.
Yêu cầu làm tối thiểu 3 tháng, tết có thưởng thâm niên. Công việc đơn giản: lễ tân giao nhận đồ giặt, bắn tem mác, thao tác giặt sấy đồ bình thường.
🎀 Liên hệ: 093.449.2381 - 0941.638.686 phỏng vấn trực tiếp tại 25 Nguyễn Cửu Vân Bình Thạnh.

blockchain SDK ChainSafe Gaming SDK

 https://chainsafe.github.io/game-docs/

Wednesday, February 23, 2022

Smooth sync for PUN

 Smooth sync for PUN


https://assetstore.unity.com/packages/tools/network/smooth-sync-96925

Monday, February 14, 2022

Note để mở tiệm giặt

Quần áo trắng hoặc ra màu thì giặt riêng 

https://www.facebook.com/ttlong2007



Sunday, February 13, 2022

Reconnect photon script

 

  1. using System;
  2. using Photon.Realtime;
  3. using UnityEngine;
  4.  
  5. namespace Photon.Pun.UtilityScripts
  6. {
  7. /// <summary>
  8. /// Unexpected disconnects recovery
  9. /// </summary>
  10. public class DisconnectsRecovery : MonoBehaviourPunCallbacks
  11. {
  12. [Tooltip("Whether or not attempt a rejoin without doing any checks.")]
  13. [SerializeField]
  14. private bool skipRejoinChecks;
  15. [Tooltip("Whether or not realtime webhooks are configured with persistence enabled")]
  16. [SerializeField]
  17. private bool persistenceEnabled;
  18.  
  19. private bool rejoinCalled;
  20.  
  21. private int minTimeRequiredToRejoin = 0; // TODO: set dynamically based on PhotonNetwork.NetworkingClient.LoadBalancingPeer.RoundTripTime
  22.  
  23. private DisconnectCause lastDisconnectCause;
  24. private bool wasInRoom;
  25.  
  26. private bool reconnectCalled;
  27.  
  28. private bool pendingAction;
  29.  
  30. public override void OnEnable()
  31. {
  32. base.OnEnable();
  33. PhotonNetwork.NetworkingClient.StateChanged += this.OnStateChanged;
  34. PhotonNetwork.KeepAliveInBackground = 0f;
  35. PhotonNetwork.PhotonServerSettings.RunInBackground = false;
  36. Application.runInBackground = false;
  37. }
  38.  
  39. public override void OnDisable()
  40. {
  41. base.OnDisable();
  42. PhotonNetwork.NetworkingClient.StateChanged -= this.OnStateChanged;
  43. }
  44.  
  45.  
  46. private void OnStateChanged(ClientState fromState, ClientState toState)
  47. {
  48. if (toState == ClientState.Disconnected)
  49. {
  50. Debug.LogFormat("OnStateChanged from {0} to {1}, PeerState={2}", fromState, toState,
  51. PhotonNetwork.NetworkingClient.LoadBalancingPeer.PeerState);
  52.  
  53. Debug.Log("Pending action raised");
  54. pendingAction = true;
  55.  
  56. }
  57. }
  58.  
  59. private void Update()
  60. {
  61. if (pendingAction)
  62. {
  63. pendingAction = false;
  64. Debug.Log("handle disconnect now");
  65. this.HandleDisconnect();
  66. }
  67. }
  68.  
  69.  
  70. public override void OnDisconnected(DisconnectCause cause)
  71. {
  72. Debug.LogFormat("OnDisconnected(cause={0}) ClientState={1} PeerState={2}",
  73. cause,
  74. PhotonNetwork.NetworkingClient.State,
  75. PhotonNetwork.NetworkingClient.LoadBalancingPeer.PeerState);
  76. if (rejoinCalled)
  77. {
  78. Debug.LogError("Rejoin failed, client disconnected");
  79. rejoinCalled = false;
  80. return;
  81. }
  82.  
  83. if (reconnectCalled)
  84. {
  85. Debug.LogError("Reconnect failed, client disconnected");
  86. reconnectCalled = false;
  87. return;
  88. }
  89. lastDisconnectCause = cause;
  90. wasInRoom = PhotonNetwork.CurrentRoom != null;
  91. if (PhotonNetwork.NetworkingClient.State == ClientState.Disconnected)
  92. {
  93. Debug.Log("Pending action raised");
  94. pendingAction = true;
  95. }
  96. }
  97.  
  98. private void HandleDisconnect()
  99. {
  100. switch (lastDisconnectCause)
  101. {
  102. case DisconnectCause.Exception:
  103. case DisconnectCause.ServerTimeout:
  104. case DisconnectCause.ClientTimeout:
  105. case DisconnectCause.DisconnectByServerLogic:
  106. case DisconnectCause.AuthenticationTicketExpired:
  107. case DisconnectCause.DisconnectByServerReasonUnknown:
  108. if (wasInRoom)
  109. {
  110. Debug.Log("CheckAndRejoin called");
  111. this.CheckAndRejoin();
  112. }
  113. else
  114. {
  115. Debug.Log("PhotonNetwork.Reconnect called");
  116. reconnectCalled = PhotonNetwork.Reconnect();
  117. }
  118. break;
  119. case DisconnectCause.OperationNotAllowedInCurrentState:
  120. case DisconnectCause.CustomAuthenticationFailed:
  121. case DisconnectCause.DisconnectByClientLogic:
  122. case DisconnectCause.InvalidAuthentication:
  123. case DisconnectCause.ExceptionOnConnect:
  124. case DisconnectCause.MaxCcuReached:
  125. case DisconnectCause.InvalidRegion:
  126. case DisconnectCause.None:
  127. break;
  128. default:
  129. throw new ArgumentOutOfRangeException("cause", lastDisconnectCause, null);
  130. }
  131. lastDisconnectCause = DisconnectCause.None;
  132. wasInRoom = false;
  133. }
  134.  
  135. public override void OnJoinRoomFailed(short returnCode, string message)
  136. {
  137. if (!rejoinCalled)
  138. {
  139. return;
  140. }
  141. rejoinCalled = false;
  142. Debug.LogErrorFormat("Quick rejoin failed with error code: {0} & error message: {1}", returnCode, message);
  143. }
  144.  
  145. public override void OnJoinedRoom()
  146. {
  147. if (rejoinCalled)
  148. {
  149. Debug.Log("Rejoin successful");
  150. rejoinCalled = false;
  151. }
  152. }
  153.  
  154. private void CheckAndRejoin()
  155. {
  156. if (skipRejoinChecks)
  157. {
  158. Debug.Log("PhotonNetwork.ReconnectAndRejoin called");
  159. rejoinCalled = PhotonNetwork.ReconnectAndRejoin();
  160. }
  161. else
  162. {
  163. bool wasLastActivePlayer = true;
  164. if (!persistenceEnabled)
  165. {
  166. for (int i = 0; i < PhotonNetwork.PlayerListOthers.Length; i++)
  167. {
  168. if (!PhotonNetwork.PlayerListOthers[i].IsInactive)
  169. {
  170. wasLastActivePlayer = false;
  171. break;
  172. }
  173. }
  174. }
  175. if ((PhotonNetwork.CurrentRoom.PlayerTtl < 0 || PhotonNetwork.CurrentRoom.PlayerTtl > minTimeRequiredToRejoin) // PlayerTTL checks
  176. && (!wasLastActivePlayer || PhotonNetwork.CurrentRoom.EmptyRoomTtl > minTimeRequiredToRejoin || persistenceEnabled)) // EmptyRoomTTL checks
  177. {
  178. Debug.Log("PhotonNetwork.ReconnectAndRejoin called");
  179. rejoinCalled = PhotonNetwork.ReconnectAndRejoin();
  180. }
  181. else
  182. {
  183. Debug.Log("PhotonNetwork.ReconnectAndRejoin not called, PhotonNetwork.Reconnect is called instead.");
  184. reconnectCalled = PhotonNetwork.Reconnect();
  185. }
  186. }
  187. }
  188.  
  189. public override void OnConnectedToMaster()
  190. {
  191. if (reconnectCalled)
  192. {
  193. Debug.Log("Reconnect successful");
  194. reconnectCalled = false;
  195. }
  196. }
  197. }
  198. }