コード例 #1
0
        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;
        }
コード例 #2
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);
        }
コード例 #3
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);
        }