コード例 #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));
        }