private void ShowWorkers(List <string> list) { Hide(); _bulletinWindow.ShowScrool(); for (int i = 0; i < list.Count; i++) { var iniPosHere = _bulletinWindow.ScrollIniPosGo.transform.localPosition + new Vector3(0, -(ReturnRelativeYSpace(4.75f, ReturnTileYScale())) * i, 0); var a = WorkerTile.CreateTile(_bulletinWindow.Content.gameObject.transform, list[i], iniPosHere); _reports.Add(a); } }
private void ShowWorkers(List <string> list) { var tileHeight = -4.35f; var height = list.Count * tileHeight; Hide(); _bulletinWindow.ShowScrool(); _bulletinWindow.AdjustContentHeight(height); for (int i = 0; i < list.Count; i++) { var a = WorkerTile.CreateTile(_bulletinWindow.Content.gameObject.transform, list[i], new Vector3()); _reports.Add(a); } }
internal static WorkerTile CreateTile(Transform container, string workType, Vector3 iniPos) { WorkerTile obj = null; var root = ""; obj = (WorkerTile)Resources.Load(Root.worker_Tile, typeof(WorkerTile)); obj = (WorkerTile)Instantiate(obj, new Vector3(), Quaternion.identity); var iniScale = obj.transform.localScale; obj.transform.SetParent(container); obj.transform.localPosition = iniPos; obj.transform.localScale = iniScale; obj.WorkType = workType; return(obj); }