public void DrawAt(CDetail detail, int x, int y) { var tile = m_tiles[x, y].transform; var detailImage = Instantiate(m_imageProto, tile.position, Quaternion.identity, m_detailParent); detailImage.GetComponent <RectTransform>().sizeDelta = m_detailSize; detailImage.sprite = detail.sprite; }
public void Set(CDetail detail) { m_visibleItems.ForEach(e => { e.SetActive(true); }); m_title.text = detail.title; m_icon.sprite = detail.sprite; m_mass.Value = detail.mass; m_speed.Value = detail.speed; m_nitro.Value = detail.fuelCap; }
public void OnClick(CDetail detail) { m_view.m_selectedDetail = detail; var availablePositions = m_view.m_gridModel .GetAvailablePositionsForInsertion(m_view.m_selectedDetail.Data); foreach (Vector2Int vect in availablePositions) { m_view.m_gridView.OpenAt(vect.x, vect.y); } m_view.m_detailProperties.Set(m_view.m_selectedDetail); }