Ejemplo n.º 1
0
        private ExpenseElement ConstructExpenseElement(ExpenseModel model, int index)
        {
            ExpenseElement newExpense = GameObject.Instantiate(original: ExpenseElements[index - 1], parent: ExpenseElements[index - 1].transform.parent.transform) as ExpenseElement;
            RectTransform  newRect    = newExpense.GetComponent <RectTransform>();

            newRect.anchoredPosition = new Vector3(newRect.anchoredPosition.x, newRect.anchoredPosition.y - CatagoryOffset);
            newExpense.UpdateView(model);
            return(newExpense);
        }
Ejemplo n.º 2
0
        public void Awake(ExpenseElement original, RectTransform tileRect, TextMeshProUGUI transactionText, TextMeshProUGUI spentText)
        {
            ExpenseElements[0] = original;
            TileRect           = tileRect;
            StartingTileHeight = TileRect.sizeDelta.y;

            Transaction = transactionText;
            Spent       = spentText;
        }
Ejemplo n.º 3
0
 private void ResetOriginalElement(ExpenseElement original, int arrayLength)
 {
     ExpenseElements    = new ExpenseElement[arrayLength];
     ExpenseElements[0] = original;
 }