public void EnterBuildMode(Building _eBuilding) { m_dataCurrent = ShopItemManager.Instance.GetBuildingData(_eBuilding); EnterState(ControlState.Build); m_placementVisual.SetSprite(m_dataCurrent.Sprite); m_placementVisual.gameObject.SetActive(true); }
public void Initialize(ShopItemData _itemData) { m_itemData = _itemData; m_visual = Instantiate(ShopItemManager.Instance.buildingVisualPrefab, transform, false); m_visual.SetSprite(_itemData.Sprite); _audioSource = GetComponent <AudioSource>(); _audioSource.PlayOneShot(m_itemData.PlacementSfx); StartCoroutine(LateStart(1)); }