SamplyGame.SamplyGame.UpdateCoins C# (CSharp) Method

UpdateCoins() private method

private UpdateCoins ( int amount ) : void
amount int
return void
		void UpdateCoins(int amount)
		{
			if (amount % 5 == 0 && amount > 0)
			{
				// give player a MassMachineGun each time he earns 5 coins
				Player.Node.AddComponent(new MassMachineGun());
			}
			coins = amount;
			coinsText.Value = string.Format(CoinstFormat, coins);
		}
	}