Beispiel #1
0
        /*--------------------------------------------------------------------------------------------*/
        private void FillCustomItems <T>(T[] pComponentList, Action <CustomItem, T> pFillAction)
            where T : Component
        {
            foreach (T comp in pComponentList)
            {
                HovercastNavItem hni = comp.gameObject.GetComponent <HovercastNavItem>();

                if (hni == null)
                {
                    continue;
                }

                int        key = hni.GetItem().AutoId;
                CustomItem cust;

                if (vCustomMap.ContainsKey(key))
                {
                    cust = vCustomMap[key];
                }
                else
                {
                    cust = new CustomItem();
                    vCustomMap.Add(key, cust);
                }

                pFillAction(cust, comp);
            }
        }
 ////////////////////////////////////////////////////////////////////////////////////////////////
 /*--------------------------------------------------------------------------------------------*/
 public void OnEnable()
 {
     vTarget = (HovercastNavItem)target;
 }
		////////////////////////////////////////////////////////////////////////////////////////////////
		/*--------------------------------------------------------------------------------------------*/
		public void OnEnable() {
			vTarget = (HovercastNavItem)target;
		}