Example #1
0
        public async ETVoid RunAsync()
        {
            if (SceneManager.GetActiveScene().name.Equals(SceneType.Battle))
            {
                ETModel.Game.Scene.GetComponent <ResourcesComponent>().UnloadBundle(AssetBundleName.Unit);
            }

            await FUIFactory.Create <LoadingViewComponent>(FUIType.Loading);
        }
        public override void Run()
        {
            FUI fui = Game.Scene.GetComponent <FUIComponent>().Get(FUIType.Hall);

            if (fui == null)
            {
                FUIFactory.Create <HallViewComponent>(FUIType.Hall).NoAwait();
            }
        }
Example #3
0
        protected async ETVoid RunAsync(ETModel.Session session, B2C_BattleEnd message)
        {
            ETModel.Game.Scene.GetComponent <TankComponent>().RemoveAll();

            // 加载Unit资源
            ResourcesComponent resourcesComponent = ETModel.Game.Scene.GetComponent <ResourcesComponent>();

            // 加载场景资源
            await resourcesComponent.LoadBundleAsync("start.unity3d");

            using (SceneChangeComponent sceneChangeComponent = Game.Scene.AddComponent <SceneChangeComponent>())
            {
                await sceneChangeComponent.ChangeSceneAsync(SceneType.Start);
            }

            await FUIFactory.Create <CombatSettlementViewComponent, B2C_BattleEnd>(FUIType.CombatSettlement, message);
        }
Example #4
0
        private async ETVoid Send_C2G_CreateRoom()
        {
            C2G_CreateRoom msg = new C2G_CreateRoom();

            msg.PeopleNum = this.GetPeopleNum();

            msg.MapId = this.GetMapName();

            msg.BigModel = this.GetBigModel();

            msg.SmallModel = this.GetSmallModel();

            msg.RoomNam = this.GetRoomName();

            G2C_CreateRoom response = (G2C_CreateRoom)await ETModel.SessionComponent.Instance.Session.Call(msg);

            if (response.Error == ErrorCode.ERR_Success)
            {
                await FUIFactory.Create <RoomViewComponent>(FUIType.Room);

                this.OnClose();
            }
        }
Example #5
0
 /// <summary>
 /// 创建常驻UI
 /// </summary>
 private void CreateConstView()
 {
     FUIFactory.Create <PopMessageViewComponent>(FUIType.PopMessage).NoAwait();
 }
Example #6
0
 public async ETVoid RunAsync()
 {
     await FUIFactory.Create <LoadingViewComponent>(FUIType.Loading);
 }
Example #7
0
 public async ETVoid RunAsync()
 {
     // 使用工厂创建一个Login UI
     await FUIFactory.Create <LoginViewComponent>(FUIType.Login);
 }
Example #8
0
        private void AgainBtn_OnClick()
        {
            FUIFactory.Create <RoomViewComponent>(FUIType.Room).NoAwait();

            this.OnClose();
        }