Beispiel #1
0
 public void DeclareThis <T>(string element, T UIobject)
     where T : UIObject
 {
     switch (element)
     {
     case "UIMoneyContainer":
         moneyContainerUI = UIobject as UIMoneyContainer;
         break;
     }
 }
Beispiel #2
0
    private void Awake()
    {
        parent = GetComponentInParent <UIMoneyContainer>();
        text   = GetComponent <Text>();
        image  = GetComponent <Image>();

        if (parent)
        {
            parent.DeclareThis(Label, this, transform.GetSiblingIndex());
        }
    }