Skip to content

Instantly share code, notes, and snippets.

@Hkazanci93
Created November 3, 2021 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hkazanci93/26b809c8ebe924fdb55ded81da1695c3 to your computer and use it in GitHub Desktop.
Save Hkazanci93/26b809c8ebe924fdb55ded81da1695c3 to your computer and use it in GitHub Desktop.
if (lastPing.AddSeconds(30) < DateTime.Now) {
isAFK = true;
GameManager gameManager = GameObject.Find("GameManager").GetComponent<GameManager>();
gameManager.StartGetLeaderboard();
gameManager.RemovePlayer(this);
Destroy(gameObject);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment