Ejemplo n.º 1
0
        private void InitializeResources()
        {
            IEnumerable <AResource> resources = m_ResourcesData.GetResources();
            Transform thisTransform           = transform;

            foreach (AResource resource in resources)
            {
                UIResource uiResource = Instantiate(m_UIResourcePrefab, thisTransform);
                uiResource.Initialize(resource);
            }
        }
Ejemplo n.º 2
0
        private void HandleDropped(GameObject droppedGO)
        {
            UIResource uiResource = droppedGO.GetComponent <UIResource>();

            if (uiResource == null)
            {
                Debug.Log("UIDemandPoint has been dropped with something else than UIResource, returning.");
                return;
            }

            m_DemandPoint.OnResourceGiven.Invoke(uiResource.Resource);
        }