Closed aadeshkulkarni closed 5 months ago
fixes #355
No.
Probably not.
Yes.
SocketManager.getInstance()
SocketManager.ts
this.instance
SocketManager.instance
Game.ts & GameManager.ts
socketManager
Looks fine, Thank you for your contribution
fixes #355
What is the purpose of this PR ?
Value additon ?
What is the PR about ?
SocketManager.getInstance()
is called frequently in a lot of places unnecessarily.Where ?
SocketManager.ts
this.instance
, we now useSocketManager.instance
which is the standard way of calling in static. (As explained in Week 21.2)Game.ts & GameManager.ts
SocketManager.getInstance()
, we can now directly usesocketManager
which points to the singleton instance.