Advertisement
OwlyOwl

winCheckingSys

Mar 5th, 2021
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.23 KB | None | 0 0
  1. [SerializeField] int coinsToWin;
  2.  
  3.     void IUpdating.OnUpdate()
  4.     {
  5.         if (game.coinsCollected >= coinsToWin)
  6.         {
  7.             Bootstrap.ChangeGameState(EGamestate.Victory);
  8.             player.level++;
  9.         }
  10.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement