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); }
public static GameObject AddUIOverViewCompnent(GameObject objectAddingUIOverViewTo, GameManager gameManager, GameObject canvas) { objectAddingUIOverViewTo.SetActive(false); UIOverView uiOverView = objectAddingUIOverViewTo.AddComponent <UIOverView>() as UIOverView; uiOverView.GameManager = gameManager; uiOverView.Canvas = canvas; objectAddingUIOverViewTo.SetActive(true); return(objectAddingUIOverViewTo); }
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); }