Пример #1
0
        void Awake()
        {
            ItemContainerManager.ItemContainers.Add(this);
            if (ItemLoader == null)
            {
                ItemLoader = GetComponentInChildren <PersistentItemContainer>();
            }

            if (GetComponent(typeof(IContainerAddAction)) == null)
            {
                ContainerAddAction = gameObject.AddComponent <BasicAddContainer>();
            }
            else
            {
                ContainerAddAction = (IContainerAddAction)GetComponent(typeof(IContainerAddAction));
            }
        }
Пример #2
0
        void Awake()
        {
            ItemContainerManager.ItemContainers.Add(this);
            if (ItemLoader == null) ItemLoader = GetComponentInChildren<PersistentItemContainer>();

            if (GetComponent(typeof(IContainerAddAction)) == null)
                ContainerAddAction = gameObject.AddComponent<BasicAddContainer>();
            else
                ContainerAddAction = (IContainerAddAction)GetComponent(typeof(IContainerAddAction));
        }