Hello i get this error and i dont understand whats i did wrong can you guys help me out?
using UnityEngine;
using System.Collections;
public class GoldPerSec : MonoBehaviour {
public UnityEngine.UI.Text gpsDisplay;
public Click click;
public ItemManager[] items;
void Awake (){
if (PlayerPrefs.HasKey ("tick")) {
GetGoldPerSec() = PlayerPrefs.GetFloat ("tick");
} else {
GetGoldPerSec() = 0;
}
}
void Start (){
StartCoroutine (AutoTick ());
}
void Update (){
gpsDisplay.text = CurrencyConverter.Instance.GetCurrencyIntoString(GetGoldPerSec(), false, true) + " gold/sec";
PlayerPrefs.SetFloat ("tick", GetGoldPerSec());
}
public float GetGoldPerSec (){
float tick = 0;
foreach (ItemManager item in items) {
tick += item.count * item.tickValue;
}
return tick;
}
public void AutoGoldPerSec (){
click.gold += GetGoldPerSec () / 10;
}
IEnumerator AutoTick (){
while(true) {
AutoGoldPerSec ();
yield return new WaitForSeconds(0.10f);
}
}
}
It gives me the The left-hand side of an assignment must be a variable, a property or an indexer Error on line 12 and 14