public void Purchase() //Delete option after purchase { PI = GameObject.FindWithTag("Player").GetComponent <PlayerInformation>(); if (PI.Credits >= S.Cost) { PI.Credits -= S.Cost; GameObject.FindWithTag("ShopPanel").GetComponent <ShopScreen>().P.PlayerReputation += Mathf.RoundToInt(S.Cost / 10f); PI.GetComponent <FleetInfo>().Ships.Add(S); GameObject.FindWithTag("ShopPanel").GetComponent <ShopScreen>().Refresh(); } }