public static GameObject AddUICityViewCompnent(GameObject objectAddingUICityViewTo, GameManager gameManager, GameObject canvas) { objectAddingUICityViewTo.SetActive(false); UICityView uiCityView = objectAddingUICityViewTo.AddComponent<UICityView>() as UICityView; uiCityView.GameManager = gameManager; uiCityView.Canvas = canvas; objectAddingUICityViewTo.SetActive(true); return objectAddingUICityViewTo; }
private void SetUpViews() { UIOverViewGO = new GameObject(); UIOverViewGO = UIOverView.AddUIOverViewCompnent(UIOverViewGO, GameManager, Canvas); UIOverView = UIOverViewGO.GetComponent <UIOverView>(); UICityViewGO = new GameObject(); UICityViewGO = UICityView.AddUICityViewCompnent(UICityViewGO, GameManager, Canvas); UICityView = UICityViewGO.GetComponent <UICityView>(); UITurnViewGO = new GameObject(); UITurnViewGO = UITurnView.AddUITurnViewCompnent(UITurnViewGO, GameManager, Canvas); }
private void SetUpViews() { UIOverViewGO = new GameObject(); UIOverViewGO = UIOverView.AddUIOverViewCompnent(UIOverViewGO, GameManager, Canvas); UIOverView = UIOverViewGO.GetComponent<UIOverView>(); UICityViewGO = new GameObject(); UICityViewGO = UICityView.AddUICityViewCompnent(UICityViewGO, GameManager, Canvas); UICityView = UICityViewGO.GetComponent<UICityView>(); UITurnViewGO = new GameObject(); UITurnViewGO = UITurnView.AddUITurnViewCompnent(UITurnViewGO, GameManager, Canvas); }