public void Render(int[] ids, double[] valuesOnEachPurse, string title, double value, char curency, DateTime date, int i) { GameObject cost = Instantiate(prefab, transform); ItemControl itemControl = cost.GetComponent <ItemControl>(); float costHeight = 100 + spacing; cost.name = i.ToString(); cost.tag = "Cost"; cost.transform.localPosition = new Vector2(cost.transform.localPosition.x, cost.transform.localPosition.y - i * costHeight); itemControl.Init(ids, valuesOnEachPurse, title, value, curency, date); cost.GetComponent <Animation>().Play("FadeIn"); height = costHeight * (i + 1); }
public void Render(int[] ids, double[] valuesOnEachPurse, string title, double value, char curency, DateTime date, int i) { GameObject income = Instantiate(prefab, transform); ItemControl itemControl = income.GetComponent <ItemControl>(); float incomeHeight = 100 + spacing; income.name = i.ToString(); income.tag = "Income"; income.transform.localPosition = new Vector2(income.transform.localPosition.x, income.transform.localPosition.y - i * incomeHeight); itemControl.Init(ids, valuesOnEachPurse, title, value, curency, date); GameObject.FindGameObjectsWithTag("Income")[i].GetComponent <Animation>().Play("FadeIn"); height = incomeHeight * (i + 1); }