public void CmdUpgrade() { if (currentLvl >= maxLvl) { return; } if (!playerBuilderScript.HasEnoughGold(upgradeCosts)) { return; } playerBuilderScript.RpcDecreaseGoldResource(upgradeCosts); RpcUpgrade(); }