public void ReSkinVoucher(CompanyScriptable company, int voucherID) { this._company = company; this._voucherID = voucherID; Material boxMat = boxObj.GetComponent <Renderer>().material; boxMat.SetColor("_BaseColor", company.companyColor); voucherNameText.text = company.vouchers[voucherID].name; companyNameText.gameObject.SetActive(false); companyLogoObj.SetActive(false); voucherNameObj.SetActive(true); }
public void ReSkinCompany(CompanyScriptable company) { this._company = company; Material boxMat = boxObj.GetComponent <Renderer>().material; boxMat.SetColor("_BaseColor", company.companyColor); Material companyLogoMat = companyLogoObj.GetComponent <Renderer>().material; companyLogoMat.SetTexture("_BaseMap", company.companyLogo); companyNameText.text = company.companyName; companyNameText.gameObject.SetActive(true); companyLogoObj.SetActive(true); voucherNameObj.SetActive(false); if (companyState && transform.position.y > yTextVisibleRange.x && transform.position.y < yTextVisibleRange.y) { companyNameText.gameObject.SetActive(true); } else { companyNameText.gameObject.SetActive(false); } }
public void SetSelectedCompany(CompanyScriptable selected) { _selectedCompany = selected; }