コード例 #1
0
        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);
        }
コード例 #2
0
        public static GameObject AddUITurnViewCompnent(GameObject objectAddingUITrunViewTo, GameManager gameManager,
                                                       GameObject canvas)
        {
            objectAddingUITrunViewTo.SetActive(false);

            UITurnView uiOverView = objectAddingUITrunViewTo.AddComponent <UITurnView>() as UITurnView;

            uiOverView.GameManager = gameManager;
            uiOverView.Canvas      = canvas;
            objectAddingUITrunViewTo.SetActive(true);

            return(objectAddingUITrunViewTo);
        }