コード例 #1
0
ファイル: TitleMain.cs プロジェクト: VeyronSakai/Talpidae
        private static ICamera BuildCamera(Transform titleMainTransform)
        {
            // CameraのRootとなるGameObjectを作る
            var cameraRoot = EmptyObjectFactory.Create(UICommonDef.CameraRootName, titleMainTransform);

            // Cameraを作る
            return(CameraBuilder.BuildCamera <UICamera>(UICommonDef.UICameraPrefabPath, cameraRoot.transform));
        }
コード例 #2
0
        public async UniTask InitializeStageAsync()
        {
            var stageRoot = EmptyObjectFactory.Create(StageRoot, _inGameMainTransform);

            _stageRootTransform = stageRoot.transform;

            var stage = await _networkApplicationService.GetStageStartAsync();

            InstantiateStage(stage);
        }
コード例 #3
0
        public void SetUp()
        {
            // CameraのRootとなるGameObjectを作る
            var cameraRoot = EmptyObjectFactory.Create(UICommonDef.CameraRootName, _inGameMainTransform);

            // Cameraを作る
            CameraBuilder.BuildCamera <InGameBattleCamera>(UICommonDef.InGameBattleCameraPrefabPath,
                                                           cameraRoot.transform);
            var uiCamera = CameraBuilder.BuildCamera <UICamera>(UICommonDef.UICameraPrefabPath, cameraRoot.transform);

            BuildCanvas(uiCamera);
        }
コード例 #4
0
        private void BuildCanvas(Transform homeMainTransform, ICamera homeUICamera)
        {
            // CanvasのPrefabのパスのリスト
            var canvasPaths = new List <string>()
            {
                UICommonDef.App0CanvasPrefabPath,
                UICommonDef.App1CanvasPrefabPath
            };

            var canvasPathParams = new CanvasPathParams(UICommonDef.CanvasRootName, canvasPaths);

            var canvasRoot = EmptyObjectFactory.Create(canvasPathParams.CanvasRootName, homeMainTransform);

            _canvasContainer = CanvasBuilder.BuildCanvases(homeUICamera, canvasPathParams,
                                                           UICommonDef.UITouchBlockWindow, canvasRoot.transform);
        }
コード例 #5
0
        public void CanCreateEmptyObject()
        {
            //-- Arrange

            var factory = new EmptyObjectFactory(m_Module);

            //-- Act

            var obj = factory.CreateEmptyObject();

            //-- Assert

            Assert.That(obj, Is.Not.Null);
            Assert.That(obj.GetType(), Is.Not.SameAs(typeof(object)));
            Assert.That(obj.GetType().Assembly.IsDynamic, Is.True);
        }