// Use this for initialization void Start() { //Set references resourceManager = GameObject.Find("ResourceManager").GetComponent <ResourceManager>(); cost = objectToBuild.GetComponent <UnitStatScript>().cost; detection = GameObject.Find("Main Camera").GetComponent <DetectTouches>(); buildManager = GameObject.Find("BuildManager").GetComponent <BuildManager>(); originalColor = this.gameObject.GetComponent <Renderer>().material.color; }
// Use this for initialization void Start() { shouldSell = false; detection = GameObject.Find("Main Camera").GetComponent <DetectTouches>(); }
// Use this for initialization void Start() { detection = GameObject.Find("Main Camera").GetComponent <DetectTouches>(); manager = GameObject.Find("UnitManager").GetComponent <UnitManager>(); originalColor = gameObject.GetComponent <Renderer>().material.color; }