private GridItemFX CreateGridItemMatchedFX(GridItemView gridItem, int points, float seconds) { var fx = PrefabPool.Get <GridItemFX>(_playfieldFxItems); fx.Configure(gridItem.Index.x, gridItem.Index.y, gridItem.ID, gridItem.transform.localPosition, _tileSize); fx.Show(points, seconds); return(fx); }
private GridItemView CreateGridItemView(int x, int y, string itemId, Vector3 position) { // var gridItem = Instantiate(_gridItemPrefab, _playfieldRootItems); var gridItem = PrefabPool.Get <GridItemView>(_playfieldRootItems); gridItem.Configure(x, y, itemId, position, _tileSize); _gridItemInstances.Add(gridItem); return(gridItem); }
private GridNodeView CreateGridNodeView(int x, int y, string nodeId, Vector3 position) { //var gridNode = Instantiate(_gridNodePrefab, _playfieldRootNodes); var gridNode = PrefabPool.Get <GridNodeView>(_playfieldRootNodes); gridNode.Configure(x, y, nodeId, position, _tileSize); _gridNodeInstances.Add(gridNode); return(gridNode); }